Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- StandardCommands.cs
- Cursors.cs
- WebPartUtil.cs
- ListControl.cs
- IpcServerChannel.cs
- InkPresenter.cs
- RowType.cs
- SmtpNetworkElement.cs
- RoutedEventArgs.cs
- InvalidWMPVersionException.cs
- Byte.cs
- IsolatedStorageException.cs
- DictionaryEntry.cs
- ItemsControl.cs
- MembershipPasswordException.cs
- CannotUnloadAppDomainException.cs
- EllipseGeometry.cs
- ContentPlaceHolderDesigner.cs
- XmlIgnoreAttribute.cs
- BasePattern.cs
- SqlCommandSet.cs
- KeyValueConfigurationCollection.cs
- ToolStripGrip.cs
- RepeaterCommandEventArgs.cs
- ScrollBar.cs
- TextServicesContext.cs
- SortedSetDebugView.cs
- PlainXmlSerializer.cs
- ReferentialConstraint.cs
- StorageBasedPackageProperties.cs
- HttpCapabilitiesEvaluator.cs
- SettingsProperty.cs
- FormatException.cs
- CodeMemberMethod.cs
- RectAnimationUsingKeyFrames.cs
- VisualBrush.cs
- RenderCapability.cs
- TextRangeEditLists.cs
- SqlMethodCallConverter.cs
- BindingContext.cs
- ObjectListItem.cs
- ValueChangedEventManager.cs
- ShaderEffect.cs
- HtmlInputReset.cs
- FormViewDeletedEventArgs.cs
- XmlUTF8TextReader.cs
- QueryPageSettingsEventArgs.cs
- IISMapPath.cs
- RankException.cs
- ConfigurationStrings.cs
- CustomAttributeFormatException.cs
- AvTrace.cs
- AnnotationResourceCollection.cs
- PeerTransportElement.cs
- ToolboxBitmapAttribute.cs
- PersonalizationProviderCollection.cs
- DataListItem.cs
- AttachInfo.cs
- CompilerTypeWithParams.cs
- RegexNode.cs
- DeploymentExceptionMapper.cs
- DbDataSourceEnumerator.cs
- GroupLabel.cs
- InternalSafeNativeMethods.cs
- Attributes.cs
- SqlFormatter.cs
- LocalizationComments.cs
- DrawingContext.cs
- remotingproxy.cs
- SelectionPattern.cs
- InheritedPropertyChangedEventArgs.cs
- PartitionResolver.cs
- DocumentPage.cs
- SoapElementAttribute.cs
- EntityContainerAssociationSetEnd.cs
- CommandID.cs
- Helpers.cs
- WhitespaceRuleReader.cs
- HotCommands.cs
- SoapFormatExtensions.cs
- SwitchElementsCollection.cs
- WizardForm.cs
- QueryContinueDragEventArgs.cs
- MenuBase.cs
- Debug.cs
- RelationalExpressions.cs
- AppDomain.cs
- DataGridCell.cs
- ViewCellRelation.cs
- ContentValidator.cs
- InternalBufferOverflowException.cs
- ServiceInfo.cs
- LoadedOrUnloadedOperation.cs
- TextElement.cs
- TemplateControlBuildProvider.cs
- ToolboxItemFilterAttribute.cs
- SystemIcons.cs
- FaultConverter.cs
- SerialErrors.cs
- ParallelDesigner.cs