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
- LoadRetryStrategyFactory.cs
- KeyFrames.cs
- DataDocumentXPathNavigator.cs
- SecurityDocument.cs
- SqlBooleanMismatchVisitor.cs
- AddingNewEventArgs.cs
- HttpTransportSecurityElement.cs
- ToolStripItemEventArgs.cs
- IFlowDocumentViewer.cs
- AnnotationService.cs
- EncoderFallback.cs
- SR.cs
- TreeNode.cs
- CodeMethodMap.cs
- PersistChildrenAttribute.cs
- ReferenceService.cs
- LocatorManager.cs
- OperationResponse.cs
- TextDocumentView.cs
- SpellerError.cs
- Int32.cs
- FixedSOMFixedBlock.cs
- DebuggerAttributes.cs
- RijndaelManaged.cs
- iisPickupDirectory.cs
- FixedSOMTextRun.cs
- AttachedProperty.cs
- TraceSwitch.cs
- XmlEncodedRawTextWriter.cs
- PrintingPermission.cs
- TextDpi.cs
- RawStylusInputCustomData.cs
- InstancePersistenceContext.cs
- BitVector32.cs
- ExpandSegmentCollection.cs
- NonClientArea.cs
- _AutoWebProxyScriptEngine.cs
- LineServicesCallbacks.cs
- XmlJsonReader.cs
- RawStylusSystemGestureInputReport.cs
- HandleCollector.cs
- OleDbPropertySetGuid.cs
- DatasetMethodGenerator.cs
- ContentPlaceHolder.cs
- x509store.cs
- IISMapPath.cs
- SpeechSynthesizer.cs
- ObjectToken.cs
- SapiInterop.cs
- RowUpdatingEventArgs.cs
- BrowserTree.cs
- FunctionDetailsReader.cs
- MatrixCamera.cs
- Module.cs
- DocComment.cs
- XhtmlBasicPhoneCallAdapter.cs
- CompressEmulationStream.cs
- TableProviderWrapper.cs
- SoapElementAttribute.cs
- RadioButtonBaseAdapter.cs
- UIElement.cs
- EnvelopedPkcs7.cs
- TextEditorParagraphs.cs
- AssemblyAssociatedContentFileAttribute.cs
- ColumnResizeUndoUnit.cs
- BamlResourceContent.cs
- DesignSurfaceCollection.cs
- WindowsHyperlink.cs
- baseshape.cs
- _LocalDataStore.cs
- HttpServerProtocol.cs
- SingleStorage.cs
- CustomAttributeFormatException.cs
- DataServiceQueryException.cs
- AddInContractAttribute.cs
- Compilation.cs
- CompositeScriptReference.cs
- PersistNameAttribute.cs
- SafeRightsManagementPubHandle.cs
- CalendarDataBindingHandler.cs
- BasicBrowserDialog.cs
- SqlBulkCopyColumnMapping.cs
- CreateUserErrorEventArgs.cs
- StreamGeometry.cs
- WebColorConverter.cs
- ManifestSignedXml.cs
- ImageListUtils.cs
- CompiledXpathExpr.cs
- KeyBinding.cs
- GiveFeedbackEvent.cs
- AssemblyHelper.cs
- HttpListenerRequest.cs
- LockCookie.cs
- IIS7WorkerRequest.cs
- RotateTransform3D.cs
- AppDomainAttributes.cs
- FontResourceCache.cs
- DefaultPropertiesToSend.cs
- CompilerScope.Storage.cs
- FaultDesigner.cs