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
- XamlBuildTaskServices.cs
- XmlWrappingReader.cs
- ContentPathSegment.cs
- ReliableMessagingVersion.cs
- ProgressBar.cs
- PathFigureCollectionValueSerializer.cs
- SettingsPropertyValue.cs
- OdbcHandle.cs
- CodeChecksumPragma.cs
- QuaternionAnimationBase.cs
- CharacterMetricsDictionary.cs
- CachedTypeface.cs
- MailMessage.cs
- OneToOneMappingSerializer.cs
- TypeContext.cs
- SmtpException.cs
- PeerNameRegistration.cs
- Profiler.cs
- wmiprovider.cs
- FigureHelper.cs
- clipboard.cs
- ColumnMapVisitor.cs
- XmlSerializerNamespaces.cs
- Instrumentation.cs
- HMACRIPEMD160.cs
- TreeView.cs
- WebResponse.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- RelatedPropertyManager.cs
- EnumerableValidator.cs
- CodeAccessPermission.cs
- DataServiceConfiguration.cs
- DesignerListAdapter.cs
- HtmlLinkAdapter.cs
- ClientScriptManager.cs
- QuotedPrintableStream.cs
- StringValidatorAttribute.cs
- StaticTextPointer.cs
- TypeLibConverter.cs
- BufferAllocator.cs
- ILGenerator.cs
- HotCommands.cs
- SecurityDescriptor.cs
- TextRangeProviderWrapper.cs
- Tile.cs
- Tile.cs
- CrossAppDomainChannel.cs
- SystemIPv4InterfaceProperties.cs
- CopyAction.cs
- UnmanagedMemoryStreamWrapper.cs
- XmlDataSourceDesigner.cs
- InputReportEventArgs.cs
- Pen.cs
- XmlRootAttribute.cs
- ApplicationException.cs
- ListControl.cs
- ContextCorrelationInitializer.cs
- TableRowCollection.cs
- BitmapSourceSafeMILHandle.cs
- NotCondition.cs
- ProjectionPruner.cs
- PageThemeParser.cs
- StrokeRenderer.cs
- XslCompiledTransform.cs
- GlyphRun.cs
- RequiredFieldValidator.cs
- InvalidFilterCriteriaException.cs
- FixedFlowMap.cs
- DesignerForm.cs
- RectAnimationClockResource.cs
- HybridObjectCache.cs
- DeploymentSection.cs
- Task.cs
- TransformerTypeCollection.cs
- Animatable.cs
- Journal.cs
- SafeNativeMethods.cs
- DataGridView.cs
- WebBrowser.cs
- HybridDictionary.cs
- AxisAngleRotation3D.cs
- DataGridTablesFactory.cs
- EditCommandColumn.cs
- CheckBoxList.cs
- Condition.cs
- XmlCompatibilityReader.cs
- DataControlLinkButton.cs
- QuotedPrintableStream.cs
- ToolStripSystemRenderer.cs
- CommandDevice.cs
- hresults.cs
- X509ChainElement.cs
- VoiceObjectToken.cs
- DependencyPropertyHelper.cs
- AssemblyBuilder.cs
- SignedXml.cs
- ScriptingJsonSerializationSection.cs
- ChildTable.cs
- Visitor.cs
- ReflectionUtil.cs