Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- XmlAnyElementAttributes.cs
- LookupNode.cs
- TrackingValidationObjectDictionary.cs
- CroppedBitmap.cs
- MetadataItem.cs
- FormViewDesigner.cs
- CollectionViewGroupInternal.cs
- CacheVirtualItemsEvent.cs
- ValueUtilsSmi.cs
- Point.cs
- UrlPath.cs
- formatter.cs
- ListenDesigner.cs
- DescriptionAttribute.cs
- MimeObjectFactory.cs
- WhitespaceRule.cs
- BooleanKeyFrameCollection.cs
- ExpanderAutomationPeer.cs
- ResetableIterator.cs
- QilReference.cs
- ContainerParagraph.cs
- TrackingSection.cs
- FormsAuthenticationModule.cs
- WebBrowserNavigatingEventHandler.cs
- AudioFormatConverter.cs
- SerTrace.cs
- StatusStrip.cs
- WindowsFont.cs
- WinFormsSecurity.cs
- XmlCodeExporter.cs
- ResourceExpression.cs
- LoggedException.cs
- CachedFontFamily.cs
- DataConnectionHelper.cs
- MessageQueuePermissionEntry.cs
- ParameterReplacerVisitor.cs
- OdbcConnection.cs
- XamlPathDataSerializer.cs
- ClientBuildManager.cs
- BuildProvider.cs
- ConfigurationManagerHelper.cs
- StrokeCollectionDefaultValueFactory.cs
- ValidatedControlConverter.cs
- InteropBitmapSource.cs
- TextCompositionEventArgs.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- NotSupportedException.cs
- SymbolDocumentInfo.cs
- XmlSerializerVersionAttribute.cs
- SmiMetaData.cs
- HttpProfileGroupBase.cs
- TcpAppDomainProtocolHandler.cs
- WsdlWriter.cs
- ComponentConverter.cs
- NavigateEvent.cs
- ResourceDescriptionAttribute.cs
- XamlStyleSerializer.cs
- XmlAggregates.cs
- DataColumnSelectionConverter.cs
- ListItemCollection.cs
- XPathDescendantIterator.cs
- InputBinding.cs
- _LoggingObject.cs
- ByteStack.cs
- ConnectionStringSettingsCollection.cs
- EntityDataSourceState.cs
- httpapplicationstate.cs
- _KerberosClient.cs
- WinEventTracker.cs
- WindowsGraphicsWrapper.cs
- Property.cs
- ToolStripRendererSwitcher.cs
- DiagnosticTraceSource.cs
- PassportAuthenticationModule.cs
- AllowedAudienceUriElement.cs
- FixedFlowMap.cs
- GlobalizationAssembly.cs
- Ref.cs
- DesignColumn.cs
- LocalFileSettingsProvider.cs
- OpCopier.cs
- XmlCompatibilityReader.cs
- XsltArgumentList.cs
- HttpListenerRequest.cs
- XmlQueryRuntime.cs
- RNGCryptoServiceProvider.cs
- FileDialog_Vista.cs
- ComponentCollection.cs
- XmlSchemaCollection.cs
- DeliveryStrategy.cs
- CellConstant.cs
- ToolStripButton.cs
- DataSourceViewSchemaConverter.cs
- HttpCacheVary.cs
- ContentPlaceHolder.cs
- BackStopAuthenticationModule.cs
- TraceSource.cs
- Privilege.cs
- ExtendedProperty.cs
- ReferencedType.cs