Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- UndirectedGraph.cs
- cookie.cs
- HandlerWithFactory.cs
- CultureInfoConverter.cs
- ZipIOExtraFieldPaddingElement.cs
- AccessViolationException.cs
- DesignerEventService.cs
- CodeActivityContext.cs
- DataContractJsonSerializer.cs
- RegexMatch.cs
- ImmutableObjectAttribute.cs
- FilterException.cs
- DateTimeConstantAttribute.cs
- TransformConverter.cs
- AppDomainFactory.cs
- CodeIdentifier.cs
- SmiEventStream.cs
- TableChangeProcessor.cs
- ActivityCodeDomSerializationManager.cs
- _Events.cs
- ScalarType.cs
- GifBitmapEncoder.cs
- TileBrush.cs
- ItemChangedEventArgs.cs
- HttpMethodAttribute.cs
- Marshal.cs
- DiagnosticsConfigurationHandler.cs
- Pkcs7Recipient.cs
- SchemaAttDef.cs
- CodeNamespaceImportCollection.cs
- TemplateInstanceAttribute.cs
- Metadata.cs
- HttpListenerRequest.cs
- EntityClassGenerator.cs
- FormParameter.cs
- NativeCompoundFileAPIs.cs
- Configuration.cs
- WebPartActionVerb.cs
- TdsParserStateObject.cs
- XmlNavigatorFilter.cs
- _NegotiateClient.cs
- ComNativeDescriptor.cs
- MILUtilities.cs
- KeyPullup.cs
- Mapping.cs
- CharacterMetrics.cs
- CacheForPrimitiveTypes.cs
- DrawingBrush.cs
- OracleRowUpdatingEventArgs.cs
- ObjectSelectorEditor.cs
- ProxyElement.cs
- BehaviorService.cs
- BoolExpr.cs
- ItemsPanelTemplate.cs
- MenuItem.cs
- UrlMappingsSection.cs
- WindowsTab.cs
- UnaryQueryOperator.cs
- WebSysDescriptionAttribute.cs
- RootDesignerSerializerAttribute.cs
- UserControl.cs
- EditCommandColumn.cs
- Pens.cs
- LinkLabelLinkClickedEvent.cs
- NoneExcludedImageIndexConverter.cs
- Expression.cs
- DataGridViewCell.cs
- WorkflowMarkupElementEventArgs.cs
- StandardTransformFactory.cs
- RightsManagementEncryptedStream.cs
- TabControlAutomationPeer.cs
- BypassElementCollection.cs
- UriSectionReader.cs
- CacheEntry.cs
- StreamSecurityUpgradeInitiator.cs
- PathFigure.cs
- Interlocked.cs
- InlinedAggregationOperator.cs
- Sentence.cs
- TdsParserHelperClasses.cs
- ClientType.cs
- GridSplitterAutomationPeer.cs
- DependencyProperty.cs
- DropShadowBitmapEffect.cs
- Crc32.cs
- CodeParameterDeclarationExpression.cs
- WebPartAddingEventArgs.cs
- TraceListeners.cs
- WCFModelStrings.Designer.cs
- RepeatBehavior.cs
- NetSectionGroup.cs
- Application.cs
- CodeVariableReferenceExpression.cs
- FormsAuthentication.cs
- UnionCqlBlock.cs
- PropertyIDSet.cs
- ProxyFragment.cs
- TypeDelegator.cs
- CustomAttributeFormatException.cs
- CodeDirectoryCompiler.cs