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
- BidPrivateBase.cs
- CompareValidator.cs
- HostExecutionContextManager.cs
- FieldMetadata.cs
- CompileLiteralTextParser.cs
- PropertyEmitterBase.cs
- CollectionChangeEventArgs.cs
- PopOutPanel.cs
- Point3D.cs
- ISAPIWorkerRequest.cs
- AlternateView.cs
- TabControlEvent.cs
- EnumDataContract.cs
- ResourceReferenceExpression.cs
- DataGridViewMethods.cs
- HttpsHostedTransportConfiguration.cs
- PointCollection.cs
- Focus.cs
- Pts.cs
- EventLogPermissionEntryCollection.cs
- WebPartRestoreVerb.cs
- ToolStripDropDownMenu.cs
- IndexOutOfRangeException.cs
- LogEntrySerialization.cs
- ButtonChrome.cs
- LinkedResourceCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- WpfGeneratedKnownTypes.cs
- AbstractExpressions.cs
- DataTrigger.cs
- PartManifestEntry.cs
- FixedBufferAttribute.cs
- BoolExpr.cs
- WinFormsComponentEditor.cs
- ToolboxItemAttribute.cs
- HtmlInputRadioButton.cs
- BindingBase.cs
- ObjectDisposedException.cs
- ServiceReflector.cs
- QueryCursorEventArgs.cs
- HttpRequestTraceRecord.cs
- SelectorItemAutomationPeer.cs
- EditorPartChrome.cs
- FileSystemEventArgs.cs
- TextEncodedRawTextWriter.cs
- JavascriptCallbackResponseProperty.cs
- DisplayToken.cs
- COM2Properties.cs
- OrderedDictionaryStateHelper.cs
- HtmlProps.cs
- SpeechDetectedEventArgs.cs
- MergeFailedEvent.cs
- DesignerActionHeaderItem.cs
- PageRequestManager.cs
- SQLInt32.cs
- _WebProxyDataBuilder.cs
- WindowsIPAddress.cs
- OleCmdHelper.cs
- CodeDelegateInvokeExpression.cs
- ArrayWithOffset.cs
- EncryptedData.cs
- PropertyItem.cs
- QueryAccessibilityHelpEvent.cs
- LinearQuaternionKeyFrame.cs
- FontStretches.cs
- ISessionStateStore.cs
- ThicknessAnimation.cs
- StatusBarAutomationPeer.cs
- XmlRawWriter.cs
- ColorTransform.cs
- GridLengthConverter.cs
- TemplateNodeContextMenu.cs
- AuthenticationModuleElementCollection.cs
- ArraySortHelper.cs
- PkcsUtils.cs
- PointAnimationUsingPath.cs
- XmlNamedNodeMap.cs
- ModelItemCollection.cs
- ArithmeticLiteral.cs
- ToolStripDropDownMenu.cs
- OleDbParameter.cs
- ManifestResourceInfo.cs
- CustomAttributeBuilder.cs
- Types.cs
- DecimalConstantAttribute.cs
- SendActivityDesignerTheme.cs
- BaseDataBoundControl.cs
- EncodedStreamFactory.cs
- SettingsAttributeDictionary.cs
- SQLBoolean.cs
- SchemaImporterExtension.cs
- AssemblyNameUtility.cs
- DelegateSerializationHolder.cs
- Solver.cs
- SqlUserDefinedAggregateAttribute.cs
- ObjectPersistData.cs
- VariantWrapper.cs
- CanonicalFontFamilyReference.cs
- ThreadAbortException.cs
- DynamicRenderer.cs