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
- SemanticResolver.cs
- WmlTextBoxAdapter.cs
- GZipDecoder.cs
- EmitterCache.cs
- MultiTrigger.cs
- HttpInputStream.cs
- ConditionalExpression.cs
- XmlDownloadManager.cs
- ColumnResizeUndoUnit.cs
- ReplyChannelAcceptor.cs
- BuildProviderUtils.cs
- DataTablePropertyDescriptor.cs
- ArgumentOutOfRangeException.cs
- NumberFunctions.cs
- TypeDescriptionProviderAttribute.cs
- CategoryGridEntry.cs
- TextRenderer.cs
- HTTPAPI_VERSION.cs
- EntityDataSourceDataSelection.cs
- SymbolMethod.cs
- TreeView.cs
- WebScriptServiceHost.cs
- Unit.cs
- ServicesUtilities.cs
- DrawingContextWalker.cs
- TextTreeFixupNode.cs
- TrackingExtract.cs
- IDReferencePropertyAttribute.cs
- EntityTemplateFactory.cs
- DelegatingHeader.cs
- FormViewAutoFormat.cs
- RightsManagementLicense.cs
- PathParser.cs
- LineSegment.cs
- MarginsConverter.cs
- ColorPalette.cs
- Executor.cs
- BuildResult.cs
- InlineUIContainer.cs
- DiffuseMaterial.cs
- lengthconverter.cs
- DataServiceHostFactory.cs
- ReadOnlyTernaryTree.cs
- ForeignKeyConstraint.cs
- GridSplitter.cs
- BinaryObjectWriter.cs
- DeferredTextReference.cs
- SpecialFolderEnumConverter.cs
- WindowsClaimSet.cs
- HttpChannelHelper.cs
- AppDomainProtocolHandler.cs
- TdsParserStateObject.cs
- DetailsViewUpdateEventArgs.cs
- DataControlImageButton.cs
- CreatingCookieEventArgs.cs
- EntityDataSourceSelectedEventArgs.cs
- TextControl.cs
- FamilyTypefaceCollection.cs
- versioninfo.cs
- IdentityModelDictionary.cs
- ByteStorage.cs
- SendMessageChannelCache.cs
- ListItemCollection.cs
- XmlSignificantWhitespace.cs
- XomlCompilerParameters.cs
- FrugalMap.cs
- HierarchicalDataSourceConverter.cs
- ClientProxyGenerator.cs
- IteratorDescriptor.cs
- TypedElement.cs
- SqlUserDefinedAggregateAttribute.cs
- InternalSafeNativeMethods.cs
- GuidelineSet.cs
- DecimalStorage.cs
- SimpleWorkerRequest.cs
- FixedStringLookup.cs
- TrackBar.cs
- XmlSchemaAll.cs
- HandleValueEditor.cs
- NativeMethods.cs
- AttachedAnnotationChangedEventArgs.cs
- MetadataPropertyvalue.cs
- HttpProfileBase.cs
- InheritanceAttribute.cs
- Win32KeyboardDevice.cs
- ManualResetEvent.cs
- SequenceDesignerAccessibleObject.cs
- control.ime.cs
- BitmapEffectrendercontext.cs
- ColumnResult.cs
- SqlConnectionPoolProviderInfo.cs
- LogLogRecord.cs
- AlphaSortedEnumConverter.cs
- ToolBarOverflowPanel.cs
- LabelEditEvent.cs
- CustomCredentialPolicy.cs
- HtmlLiteralTextAdapter.cs
- XPathBinder.cs
- RetriableClipboard.cs
- ServicePointManagerElement.cs