Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- TableCellsCollectionEditor.cs
- PtsPage.cs
- SmtpTransport.cs
- updatecommandorderer.cs
- NotConverter.cs
- ReflectionTypeLoadException.cs
- LinqDataView.cs
- TreeBuilderXamlTranslator.cs
- LockedHandleGlyph.cs
- Configuration.cs
- CalendarDataBindingHandler.cs
- CacheRequest.cs
- TileBrush.cs
- ControlCodeDomSerializer.cs
- TimeoutHelper.cs
- WebAdminConfigurationHelper.cs
- CodeNamespaceImportCollection.cs
- MessageVersion.cs
- RootAction.cs
- OleDbCommand.cs
- AutomationEvent.cs
- HighlightComponent.cs
- NullRuntimeConfig.cs
- EntityDataSourceStatementEditorForm.cs
- CurrentTimeZone.cs
- MatrixUtil.cs
- XmlSerializerVersionAttribute.cs
- TextTabProperties.cs
- DirectoryObjectSecurity.cs
- BasicDesignerLoader.cs
- MasterPage.cs
- OleDbStruct.cs
- ImageSource.cs
- SystemBrushes.cs
- SystemDiagnosticsSection.cs
- _LazyAsyncResult.cs
- Tokenizer.cs
- SafeFileHandle.cs
- SchemaTableOptionalColumn.cs
- EnumValAlphaComparer.cs
- FamilyMapCollection.cs
- Geometry3D.cs
- BoundColumn.cs
- WindowsListView.cs
- EdmToObjectNamespaceMap.cs
- DocumentSchemaValidator.cs
- DigestTraceRecordHelper.cs
- OracleString.cs
- SafeReversePInvokeHandle.cs
- EntityDataSourceReferenceGroup.cs
- PenLineJoinValidation.cs
- WindowsHyperlink.cs
- OutputCacheModule.cs
- ResourceManager.cs
- Predicate.cs
- FunctionCommandText.cs
- EventListener.cs
- CultureSpecificStringDictionary.cs
- HashMembershipCondition.cs
- TextHidden.cs
- MemberDescriptor.cs
- SearchForVirtualItemEventArgs.cs
- StartUpEventArgs.cs
- KerberosTokenFactoryCredential.cs
- CodeLabeledStatement.cs
- SqlTopReducer.cs
- TextTreePropertyUndoUnit.cs
- RequestCachePolicy.cs
- PackageProperties.cs
- FormsAuthenticationEventArgs.cs
- CombinedGeometry.cs
- mediapermission.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- EntityDataSourceWrapper.cs
- Rect3DConverter.cs
- PerfCounterSection.cs
- storepermission.cs
- SqlDataSourceQuery.cs
- KeyInfo.cs
- DataGridTable.cs
- CommonRemoteMemoryBlock.cs
- ObjectItemLoadingSessionData.cs
- FixedDocument.cs
- QueueException.cs
- RandomDelayQueuedSendsAsyncResult.cs
- XmlnsCompatibleWithAttribute.cs
- MemoryPressure.cs
- WebExceptionStatus.cs
- BindingCollection.cs
- VisualStateGroup.cs
- GifBitmapEncoder.cs
- SafeLibraryHandle.cs
- VectorAnimation.cs
- D3DImage.cs
- TraceSwitch.cs
- PropertyCondition.cs
- DbgCompiler.cs
- ProcessHostConfigUtils.cs
- ReplacementText.cs
- ContextMenu.cs