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
- TransformerInfoCollection.cs
- WebPartCatalogAddVerb.cs
- XmlQueryRuntime.cs
- DataListCommandEventArgs.cs
- ThemeInfoAttribute.cs
- Event.cs
- QilReplaceVisitor.cs
- XmlSchemaAppInfo.cs
- UriPrefixTable.cs
- SymLanguageVendor.cs
- RunInstallerAttribute.cs
- IdnElement.cs
- LifetimeServices.cs
- sqlinternaltransaction.cs
- SystemColorTracker.cs
- DockPanel.cs
- ApplicationException.cs
- GridViewRow.cs
- InkCanvasFeedbackAdorner.cs
- Pen.cs
- RectangleConverter.cs
- OrderByQueryOptionExpression.cs
- XmlHierarchicalEnumerable.cs
- RegularExpressionValidator.cs
- PreservationFileWriter.cs
- PauseStoryboard.cs
- Int64Storage.cs
- BoundField.cs
- AnimatedTypeHelpers.cs
- LinkLabelLinkClickedEvent.cs
- arabicshape.cs
- PreservationFileReader.cs
- EntityDataSourceEntityTypeFilterItem.cs
- Container.cs
- ProbeMatchesMessage11.cs
- StylusOverProperty.cs
- WsdlContractConversionContext.cs
- RadioButtonFlatAdapter.cs
- ToolStripDropTargetManager.cs
- WriteTimeStream.cs
- IndicFontClient.cs
- PointConverter.cs
- BookmarkWorkItem.cs
- Int32KeyFrameCollection.cs
- _LocalDataStoreMgr.cs
- typedescriptorpermission.cs
- SqlExpander.cs
- DefaultBinder.cs
- DetailsViewUpdatedEventArgs.cs
- CheckBoxFlatAdapter.cs
- TabControlEvent.cs
- BulletChrome.cs
- HttpException.cs
- OdbcParameterCollection.cs
- Variant.cs
- PeerPresenceInfo.cs
- DataGridCellInfo.cs
- ProfileService.cs
- WebBrowserHelper.cs
- CompositeCollectionView.cs
- OleCmdHelper.cs
- NamespaceMapping.cs
- arabicshape.cs
- ScriptHandlerFactory.cs
- StreamGeometryContext.cs
- XAMLParseException.cs
- TextEditor.cs
- WebPartsSection.cs
- FastPropertyAccessor.cs
- MarkupCompilePass1.cs
- DeferredElementTreeState.cs
- WorkflowControlClient.cs
- SafeRegistryHandle.cs
- Content.cs
- XmlCharCheckingReader.cs
- Timer.cs
- DataGridViewAccessibleObject.cs
- KeyInstance.cs
- ListManagerBindingsCollection.cs
- ServiceModelDictionary.cs
- KernelTypeValidation.cs
- ExpandCollapseProviderWrapper.cs
- LexicalChunk.cs
- GregorianCalendarHelper.cs
- SafeArrayTypeMismatchException.cs
- Cursors.cs
- SqlDataReader.cs
- MetadataArtifactLoaderCompositeFile.cs
- ProfileProvider.cs
- MouseOverProperty.cs
- LinkedResourceCollection.cs
- ComplexObject.cs
- ConfigXmlSignificantWhitespace.cs
- PropertyManager.cs
- LogicalExpr.cs
- StandardCommands.cs
- StoreAnnotationsMap.cs
- QilReplaceVisitor.cs
- CompilationRelaxations.cs
- WSFederationHttpSecurityElement.cs