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
- DoWorkEventArgs.cs
- DLinqTableProvider.cs
- SafeLibraryHandle.cs
- ValidationPropertyAttribute.cs
- TypeDescriptor.cs
- RightsManagementPermission.cs
- Math.cs
- DataObjectMethodAttribute.cs
- ComboBoxAutomationPeer.cs
- BlobPersonalizationState.cs
- Journal.cs
- RawStylusInputCustomDataList.cs
- Connector.cs
- EntityClassGenerator.cs
- UpdateCommand.cs
- Pens.cs
- GatewayIPAddressInformationCollection.cs
- Visual3D.cs
- LinkUtilities.cs
- UriParserTemplates.cs
- WebBrowserUriTypeConverter.cs
- CultureInfo.cs
- ObjectManager.cs
- ButtonField.cs
- DocumentEventArgs.cs
- ParentQuery.cs
- EdmProperty.cs
- Scene3D.cs
- IItemContainerGenerator.cs
- XDeferredAxisSource.cs
- CodeExpressionCollection.cs
- Oci.cs
- MessageAction.cs
- XmlSchemaAttribute.cs
- HatchBrush.cs
- DbConnectionPoolGroupProviderInfo.cs
- BamlLocalizableResource.cs
- Vars.cs
- SafeNativeMethodsOther.cs
- ForwardPositionQuery.cs
- DiscoveryUtility.cs
- AccessDataSourceView.cs
- SerTrace.cs
- ScriptReference.cs
- OptimalTextSource.cs
- EllipticalNodeOperations.cs
- RectangleGeometry.cs
- TransactedReceiveScope.cs
- SymbolDocumentGenerator.cs
- DataGridViewCellEventArgs.cs
- HtmlFormParameterReader.cs
- PolyBezierSegment.cs
- invalidudtexception.cs
- ChannelManager.cs
- XamlGridLengthSerializer.cs
- EndpointBehaviorElementCollection.cs
- KeyedQueue.cs
- SR.cs
- UpdateManifestForBrowserApplication.cs
- IntSumAggregationOperator.cs
- SQLGuidStorage.cs
- StandardCommands.cs
- SystemColors.cs
- Permission.cs
- DoubleAnimationUsingKeyFrames.cs
- CellQuery.cs
- ConfigUtil.cs
- SqlSelectStatement.cs
- FileIOPermission.cs
- WpfWebRequestHelper.cs
- BindToObject.cs
- GACMembershipCondition.cs
- StateMachineAction.cs
- GraphicsContainer.cs
- FactoryGenerator.cs
- TCEAdapterGenerator.cs
- FormViewUpdateEventArgs.cs
- DynamicRendererThreadManager.cs
- HTMLTextWriter.cs
- RelationshipEnd.cs
- PathSegment.cs
- TextParagraphView.cs
- NameGenerator.cs
- RSAPKCS1SignatureDeformatter.cs
- SmtpClient.cs
- SerializationTrace.cs
- Literal.cs
- Int16Converter.cs
- DynamicILGenerator.cs
- NullableBoolConverter.cs
- FragmentQueryProcessor.cs
- EntityCommandCompilationException.cs
- StorageAssociationSetMapping.cs
- LinkedDataMemberFieldEditor.cs
- BaseTemplateParser.cs
- SqlSelectStatement.cs
- UidManager.cs
- Byte.cs
- ApplicationSettingsBase.cs
- TemplatePropertyEntry.cs