Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / DialogResultConverter.cs / 1305600 / DialogResultConverter.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DialogResultConverter.cs // // Description: Contains the DialogResultConverter: TypeConverter for the DialogResult class. // // History: // 10/31/2003 : [....] - Created // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Globalization; namespace System.Windows { ////// DialogResultConverter - Converter class for converting instances of other types to and from DialogResult instances. /// public class DialogResultConverter: TypeConverter { //------------------------------------------------------------------- // // Public Methods // //------------------------------------------------------------------- #region Public Methods ////// CanConvertFrom - We don't support convert from other types to DialogResult /// ////// bool - Always return False /// public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) { // We don't support ConvertFrom return false; } ////// CanConvertTo - Returns whether or not this class can convert to a given type. /// ////// bool - Always return False /// public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) { // We don't support ConvertTo return false; } ////// ConvertFrom - Attempt to convert to a DialogResult from the given object. /// Always throw InvalidOperation exception /// public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source) { throw new InvalidOperationException(SR.Get(SRID.CantSetInMarkup)); } ////// ConvertTo - Attempt to convert a DialogResult to the given type /// Always throw InvalidOperation exception /// public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType) { throw new InvalidOperationException(SR.Get(SRID.CantSetInMarkup)); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DialogResultConverter.cs // // Description: Contains the DialogResultConverter: TypeConverter for the DialogResult class. // // History: // 10/31/2003 : [....] - Created // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Globalization; namespace System.Windows { ////// DialogResultConverter - Converter class for converting instances of other types to and from DialogResult instances. /// public class DialogResultConverter: TypeConverter { //------------------------------------------------------------------- // // Public Methods // //------------------------------------------------------------------- #region Public Methods ////// CanConvertFrom - We don't support convert from other types to DialogResult /// ////// bool - Always return False /// public override bool CanConvertFrom(ITypeDescriptorContext typeDescriptorContext, Type sourceType) { // We don't support ConvertFrom return false; } ////// CanConvertTo - Returns whether or not this class can convert to a given type. /// ////// bool - Always return False /// public override bool CanConvertTo(ITypeDescriptorContext typeDescriptorContext, Type destinationType) { // We don't support ConvertTo return false; } ////// ConvertFrom - Attempt to convert to a DialogResult from the given object. /// Always throw InvalidOperation exception /// public override object ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object source) { throw new InvalidOperationException(SR.Get(SRID.CantSetInMarkup)); } ////// ConvertTo - Attempt to convert a DialogResult to the given type /// Always throw InvalidOperation exception /// public override object ConvertTo(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, object value, Type destinationType) { throw new InvalidOperationException(SR.Get(SRID.CantSetInMarkup)); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ZipIOCentralDirectoryBlock.cs
- Types.cs
- SystemIPGlobalProperties.cs
- IndentedWriter.cs
- DetailsView.cs
- GeneralTransform3D.cs
- StrokeNode.cs
- WindowInteropHelper.cs
- TracedNativeMethods.cs
- DbDeleteCommandTree.cs
- SizeIndependentAnimationStorage.cs
- FontSourceCollection.cs
- ViewManager.cs
- QueryOperationResponseOfT.cs
- CodeSnippetStatement.cs
- SymmetricKeyWrap.cs
- TraceUtils.cs
- TaskSchedulerException.cs
- InvalidEnumArgumentException.cs
- DataControlReference.cs
- DataServiceStreamProviderWrapper.cs
- SmiContextFactory.cs
- Set.cs
- WebConfigurationManager.cs
- ToolStripControlHost.cs
- AdCreatedEventArgs.cs
- SerTrace.cs
- SQLInt32Storage.cs
- xamlnodes.cs
- DateTimeStorage.cs
- PageAsyncTaskManager.cs
- ActivityBindForm.cs
- RC2CryptoServiceProvider.cs
- DeflateInput.cs
- Resources.Designer.cs
- VirtualPathUtility.cs
- ObjectSpanRewriter.cs
- Quad.cs
- ConnectionProviderAttribute.cs
- CustomAttributeBuilder.cs
- X509Utils.cs
- PresentationTraceSources.cs
- Typography.cs
- TreeNodeStyleCollectionEditor.cs
- ListControlBoundActionList.cs
- DbMetaDataCollectionNames.cs
- MemberExpression.cs
- InputMethod.cs
- EventLogException.cs
- PageRanges.cs
- PowerStatus.cs
- WebPartMenuStyle.cs
- EndpointDiscoveryBehavior.cs
- DbConnectionPoolGroup.cs
- BamlRecordWriter.cs
- LambdaCompiler.Generated.cs
- XmlSchemaComplexContent.cs
- _NTAuthentication.cs
- CodeLabeledStatement.cs
- TrackingMemoryStreamFactory.cs
- EraserBehavior.cs
- SpoolingTaskBase.cs
- WebPartZone.cs
- SecurityPolicySection.cs
- InputScope.cs
- RealProxy.cs
- BinHexDecoder.cs
- Serializer.cs
- ByeMessageApril2005.cs
- LineServices.cs
- DeriveBytes.cs
- NameTable.cs
- TableRowGroup.cs
- MtomMessageEncoder.cs
- GridViewColumnHeader.cs
- unitconverter.cs
- UserPersonalizationStateInfo.cs
- AutomationEventArgs.cs
- TreeView.cs
- AutomationEvent.cs
- XPathException.cs
- EndPoint.cs
- BeginCreateSecurityTokenRequest.cs
- Preprocessor.cs
- MatchingStyle.cs
- BoundField.cs
- ComMethodElementCollection.cs
- ValuePatternIdentifiers.cs
- XmlSchemaSimpleContent.cs
- Compiler.cs
- NetMsmqBindingCollectionElement.cs
- ListBoxItemWrapperAutomationPeer.cs
- Certificate.cs
- RawMouseInputReport.cs
- DbParameterHelper.cs
- FileChangesMonitor.cs
- KeyConverter.cs
- GlobalProxySelection.cs
- RecipientInfo.cs
- TextSpan.cs