Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / DialogResultConverter.cs / 1 / 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 : HuWang - 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 : HuWang - 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
- GlobalItem.cs
- DataGridItemEventArgs.cs
- ZoneLinkButton.cs
- SmtpTransport.cs
- BufferBuilder.cs
- GetPageCompletedEventArgs.cs
- TextParaLineResult.cs
- XmlCDATASection.cs
- DbProviderConfigurationHandler.cs
- XmlDeclaration.cs
- FigureHelper.cs
- StructuralType.cs
- SubstitutionList.cs
- ValidationEventArgs.cs
- DefaultValidator.cs
- DesignerWebPartChrome.cs
- ListViewGroupConverter.cs
- AnonymousIdentificationModule.cs
- SafeRightsManagementSessionHandle.cs
- UpDownEvent.cs
- ToolStripContainer.cs
- WebPartEditorCancelVerb.cs
- TcpClientChannel.cs
- AddInToken.cs
- CodeDirectiveCollection.cs
- X509UI.cs
- InvalidFilterCriteriaException.cs
- StackBuilderSink.cs
- _SslSessionsCache.cs
- XmlRawWriterWrapper.cs
- AQNBuilder.cs
- _DigestClient.cs
- StructuredTypeEmitter.cs
- SoapSchemaMember.cs
- DataServiceExpressionVisitor.cs
- TimeoutValidationAttribute.cs
- ItemsControlAutomationPeer.cs
- FormViewCommandEventArgs.cs
- StorageTypeMapping.cs
- TreeViewItemAutomationPeer.cs
- DateTimeUtil.cs
- securitycriticaldataClass.cs
- ZoneButton.cs
- AuthenticationModulesSection.cs
- TextServicesLoader.cs
- DbConnectionInternal.cs
- EnlistmentTraceIdentifier.cs
- OverlappedContext.cs
- CheckedListBox.cs
- MethodBody.cs
- FrameworkContentElement.cs
- SynchronousChannel.cs
- KeysConverter.cs
- MarginCollapsingState.cs
- UMPAttributes.cs
- MatrixTransform.cs
- CodeTypeReferenceCollection.cs
- InternalMappingException.cs
- TransactionChannel.cs
- HttpTransportSecurityElement.cs
- COM2ComponentEditor.cs
- PngBitmapEncoder.cs
- InternalConfigHost.cs
- SqlConnection.cs
- VersionedStreamOwner.cs
- ActivationWorker.cs
- TemplateField.cs
- XamlPointCollectionSerializer.cs
- ConsumerConnectionPointCollection.cs
- Regex.cs
- RegistryDataKey.cs
- Group.cs
- BuildDependencySet.cs
- PropertyFilter.cs
- ValidatingReaderNodeData.cs
- EventProviderBase.cs
- ADMembershipUser.cs
- TransformGroup.cs
- CodeGroup.cs
- StylusPointProperty.cs
- HostSecurityManager.cs
- XmlBaseReader.cs
- webclient.cs
- DocumentViewerAutomationPeer.cs
- RemotingException.cs
- WebPartCatalogAddVerb.cs
- InputProviderSite.cs
- UntypedNullExpression.cs
- FlowDocumentReaderAutomationPeer.cs
- EntityDataSourceDesigner.cs
- FixedSOMImage.cs
- SymbolEqualComparer.cs
- XmlBinaryReader.cs
- ProcessHostConfigUtils.cs
- ListViewDeletedEventArgs.cs
- DisposableCollectionWrapper.cs
- BlockUIContainer.cs
- DoubleCollectionConverter.cs
- StringFreezingAttribute.cs
- GraphicsContext.cs