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
- ChangePassword.cs
- PropertyValueChangedEvent.cs
- DoubleAnimation.cs
- AttributeCollection.cs
- DropDownList.cs
- ButtonColumn.cs
- DataTableNewRowEvent.cs
- ConfigXmlSignificantWhitespace.cs
- rsa.cs
- XmlCollation.cs
- AppModelKnownContentFactory.cs
- ObjectStateFormatter.cs
- SiteOfOriginPart.cs
- Expression.DebuggerProxy.cs
- ChangesetResponse.cs
- ListBoxItemWrapperAutomationPeer.cs
- SocketException.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- externdll.cs
- ParallelActivityDesigner.cs
- WindowCollection.cs
- GPPOINT.cs
- Bitmap.cs
- dataSvcMapFileLoader.cs
- HttpApplicationStateBase.cs
- DataGridViewButtonCell.cs
- DataViewListener.cs
- PLINQETWProvider.cs
- EventLogEntry.cs
- SqlRecordBuffer.cs
- SamlNameIdentifierClaimResource.cs
- embossbitmapeffect.cs
- ScriptBehaviorDescriptor.cs
- GeneralTransform2DTo3D.cs
- OptimisticConcurrencyException.cs
- FormViewDesigner.cs
- CfgSemanticTag.cs
- FileDetails.cs
- COM2ColorConverter.cs
- MarkupExtensionReturnTypeAttribute.cs
- ServiceModelEnumValidator.cs
- WorkflowPrinting.cs
- FilterElement.cs
- METAHEADER.cs
- MetadataException.cs
- TextEndOfSegment.cs
- PropertyGrid.cs
- Bits.cs
- SerializationFieldInfo.cs
- SoapAttributeAttribute.cs
- Transform.cs
- MenuTracker.cs
- NameValueConfigurationElement.cs
- SoapClientProtocol.cs
- BuildTopDownAttribute.cs
- DebugView.cs
- FakeModelPropertyImpl.cs
- Helpers.cs
- SendAgentStatusRequest.cs
- Part.cs
- PersonalizationStateInfoCollection.cs
- ProviderUtil.cs
- PageFunction.cs
- SqlEnums.cs
- IdentityReference.cs
- WebAdminConfigurationHelper.cs
- GlyphInfoList.cs
- CommandLineParser.cs
- MergeFilterQuery.cs
- XmlTextReaderImplHelpers.cs
- ConnectionManagementElement.cs
- NumericUpDownAccelerationCollection.cs
- ComPlusServiceLoader.cs
- Helper.cs
- WorkflowOperationContext.cs
- WebPartsPersonalization.cs
- Permission.cs
- SignatureGenerator.cs
- SoapSchemaImporter.cs
- BooleanExpr.cs
- DynamicMethod.cs
- SmiEventSink_DeferedProcessing.cs
- SqlBinder.cs
- RtfToXamlLexer.cs
- FrameAutomationPeer.cs
- XamlClipboardData.cs
- ForeignKeyConstraint.cs
- CompilationPass2TaskInternal.cs
- odbcmetadatafactory.cs
- DateTimeValueSerializerContext.cs
- RepeatInfo.cs
- RunClient.cs
- Compiler.cs
- Size.cs
- WindowsGraphics2.cs
- COAUTHINFO.cs
- Menu.cs
- SemanticResolver.cs
- WebPartDisplayModeCollection.cs
- WindowHideOrCloseTracker.cs