Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / DialogResultConverter.cs / 1305600 / 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 : [....] - 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
- StoragePropertyMapping.cs
- ArrayList.cs
- EnumBuilder.cs
- TableLayout.cs
- UrlEncodedParameterWriter.cs
- SynchronizationLockException.cs
- SlipBehavior.cs
- ToolboxItemCollection.cs
- UpdateException.cs
- XmlConvert.cs
- Filter.cs
- ExpressionVisitor.cs
- FileLogRecordStream.cs
- SectionUpdates.cs
- SamlAssertionKeyIdentifierClause.cs
- DrawingBrush.cs
- OLEDB_Util.cs
- ExpressionVisitor.cs
- _AutoWebProxyScriptHelper.cs
- Psha1DerivedKeyGenerator.cs
- PropertyValidationContext.cs
- TextEditorLists.cs
- ZipIOExtraFieldZip64Element.cs
- ObjectManager.cs
- SmtpDigestAuthenticationModule.cs
- UnrecognizedPolicyAssertionElement.cs
- WithParamAction.cs
- ObjectDataSourceSelectingEventArgs.cs
- RoleExceptions.cs
- CreateUserWizardStep.cs
- StylusShape.cs
- ListSortDescription.cs
- ResourceDefaultValueAttribute.cs
- XmlEntity.cs
- XmlUtf8RawTextWriter.cs
- SqlNotificationEventArgs.cs
- HttpProfileGroupBase.cs
- AutomationAttributeInfo.cs
- SourceInterpreter.cs
- Point4D.cs
- xmlformatgeneratorstatics.cs
- WebPartVerbCollection.cs
- WebPartTransformerCollection.cs
- MembershipSection.cs
- CapacityStreamGeometryContext.cs
- WCFModelStrings.Designer.cs
- _ProxyChain.cs
- NativeMethods.cs
- Rect3DValueSerializer.cs
- IndexingContentUnit.cs
- ServiceOperationDetailViewControl.cs
- DataSourceCacheDurationConverter.cs
- ServiceContractGenerationContext.cs
- XmlAtomicValue.cs
- SwitchLevelAttribute.cs
- Boolean.cs
- ReaderContextStackData.cs
- ClientFormsAuthenticationMembershipProvider.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- EntityViewGenerationConstants.cs
- XmlnsCache.cs
- GeometryValueSerializer.cs
- RawKeyboardInputReport.cs
- TypeCodeDomSerializer.cs
- WindowsTokenRoleProvider.cs
- DataBindingExpressionBuilder.cs
- FontNamesConverter.cs
- Property.cs
- XmlUnspecifiedAttribute.cs
- WebZoneDesigner.cs
- Pair.cs
- Internal.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ComponentEvent.cs
- SQLBytes.cs
- RotateTransform.cs
- SqlCacheDependency.cs
- SpStreamWrapper.cs
- AttributedMetaModel.cs
- ProtocolsConfiguration.cs
- MaskedTextBox.cs
- GeneralTransform3DGroup.cs
- PriorityChain.cs
- ArgumentOutOfRangeException.cs
- VisualTreeHelper.cs
- DataSetViewSchema.cs
- SecurityHelper.cs
- EditingScope.cs
- ProcessThreadCollection.cs
- ObjectListTitleAttribute.cs
- UnmanagedMemoryStream.cs
- XamlTreeBuilder.cs
- XmlSchemaImport.cs
- CombinedGeometry.cs
- PassportAuthentication.cs
- SqlBuilder.cs
- LicFileLicenseProvider.cs
- TcpHostedTransportConfiguration.cs
- HttpCookie.cs
- SystemColors.cs