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
- Rectangle.cs
- SBCSCodePageEncoding.cs
- PointHitTestResult.cs
- MessageBox.cs
- RestHandler.cs
- QuadraticBezierSegment.cs
- AccessDataSourceView.cs
- WebServiceParameterData.cs
- SequentialWorkflowRootDesigner.cs
- StateItem.cs
- SimpleMailWebEventProvider.cs
- WebHeaderCollection.cs
- XmlUtf8RawTextWriter.cs
- Pkcs9Attribute.cs
- ManagementOperationWatcher.cs
- ListItem.cs
- MDIWindowDialog.cs
- BamlLocalizableResourceKey.cs
- SubMenuStyleCollectionEditor.cs
- Win32MouseDevice.cs
- AttributeCollection.cs
- ClientSponsor.cs
- ConditionBrowserDialog.cs
- StaticDataManager.cs
- FlowDocumentReaderAutomationPeer.cs
- TimeSpanMinutesConverter.cs
- XsdBuilder.cs
- CommandPlan.cs
- Hyperlink.cs
- SrgsItemList.cs
- SchemaAttDef.cs
- figurelengthconverter.cs
- StackBuilderSink.cs
- ResourceExpressionBuilder.cs
- DataGridViewTopRowAccessibleObject.cs
- SelectionChangedEventArgs.cs
- SchemaTableColumn.cs
- _NegoStream.cs
- TypeElement.cs
- StateWorkerRequest.cs
- ConstNode.cs
- FontSource.cs
- RadioButtonAutomationPeer.cs
- InstanceCollisionException.cs
- BoolExpression.cs
- MgmtResManager.cs
- ToolboxComponentsCreatingEventArgs.cs
- ResourcesGenerator.cs
- SAPIEngineTypes.cs
- RootDesignerSerializerAttribute.cs
- QueryResult.cs
- Timer.cs
- LinqDataSourceUpdateEventArgs.cs
- Compiler.cs
- CellQuery.cs
- Clause.cs
- PageCatalogPart.cs
- XamlPoint3DCollectionSerializer.cs
- ContactManager.cs
- BamlBinaryReader.cs
- ShaperBuffers.cs
- XmlQualifiedNameTest.cs
- ServiceMemoryGates.cs
- XmlSchemaAny.cs
- GenericPrincipal.cs
- RuleSettings.cs
- DrawingState.cs
- GlobalEventManager.cs
- SplitContainer.cs
- Win32.cs
- RelatedPropertyManager.cs
- ObjectPersistData.cs
- StateMachineSubscription.cs
- AlphabeticalEnumConverter.cs
- DynamicAttribute.cs
- EpmCustomContentDeSerializer.cs
- PropertyFilterAttribute.cs
- TreeViewItem.cs
- DataTableMappingCollection.cs
- WorkflowTimerService.cs
- MDIWindowDialog.cs
- BodyGlyph.cs
- XmlComplianceUtil.cs
- FileDialogCustomPlace.cs
- CallbackException.cs
- RsaKeyIdentifierClause.cs
- XmlSchemaType.cs
- XmlNamespaceMappingCollection.cs
- FormsAuthenticationEventArgs.cs
- ClassGenerator.cs
- MonthChangedEventArgs.cs
- Normalization.cs
- Vector3DAnimationUsingKeyFrames.cs
- Registry.cs
- ProfileService.cs
- ResourceContainer.cs
- DetailsViewPageEventArgs.cs
- Canvas.cs
- PeerNameResolver.cs
- ImageMetadata.cs