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
- HtmlMobileTextWriter.cs
- UnhandledExceptionEventArgs.cs
- TextTreeText.cs
- PlainXmlWriter.cs
- ScopelessEnumAttribute.cs
- QilPatternVisitor.cs
- Int32Converter.cs
- Trace.cs
- TdsParserSafeHandles.cs
- BoolExpressionVisitors.cs
- XsdCachingReader.cs
- DetailsViewUpdatedEventArgs.cs
- Pair.cs
- DependencyPropertyValueSerializer.cs
- PolicyConversionContext.cs
- MetadataUtil.cs
- BevelBitmapEffect.cs
- TimerTable.cs
- SubMenuStyleCollection.cs
- GridEntryCollection.cs
- NamespaceList.cs
- ApplicationException.cs
- ResponseStream.cs
- FontFamilyValueSerializer.cs
- Rectangle.cs
- TextPenaltyModule.cs
- ArrayExtension.cs
- CheckoutException.cs
- ThumbButtonInfoCollection.cs
- CallTemplateAction.cs
- DataList.cs
- DbDataSourceEnumerator.cs
- Stack.cs
- SystemTcpStatistics.cs
- BordersPage.cs
- TextDecorationCollection.cs
- SqlDataSourceEnumerator.cs
- XsltArgumentList.cs
- NameValueCollection.cs
- ColorConvertedBitmapExtension.cs
- SqlProfileProvider.cs
- IRCollection.cs
- TableLayoutPanel.cs
- IPPacketInformation.cs
- EntityDataSourceStatementEditorForm.cs
- NetworkInformationPermission.cs
- Model3D.cs
- Pool.cs
- DbCommandTree.cs
- SqlTransaction.cs
- SqlClientFactory.cs
- TrustDriver.cs
- ToolStripRenderEventArgs.cs
- InfoCardRSACryptoProvider.cs
- StateBag.cs
- WorkflowDefinitionDispenser.cs
- DragAssistanceManager.cs
- DnsElement.cs
- TextElementEditingBehaviorAttribute.cs
- FileUtil.cs
- OleDbReferenceCollection.cs
- ButtonFlatAdapter.cs
- XmlTextEncoder.cs
- SHA256.cs
- NavigationPropertySingletonExpression.cs
- AmbientLight.cs
- DataServiceContext.cs
- Int32KeyFrameCollection.cs
- GridViewCommandEventArgs.cs
- OuterGlowBitmapEffect.cs
- HMACSHA1.cs
- TextTreeNode.cs
- EntitySetBaseCollection.cs
- OdbcTransaction.cs
- HtmlProps.cs
- sqlstateclientmanager.cs
- SimpleWebHandlerParser.cs
- PageContentAsyncResult.cs
- DataGridDetailsPresenter.cs
- httpserverutility.cs
- EventLogPermissionAttribute.cs
- FixedSOMTable.cs
- WeakReferenceList.cs
- ValidationSummary.cs
- sqlstateclientmanager.cs
- RegexCharClass.cs
- DataGridViewColumnEventArgs.cs
- ReadonlyMessageFilter.cs
- NonBatchDirectoryCompiler.cs
- CommandHelpers.cs
- SignedPkcs7.cs
- FontConverter.cs
- DataSourceListEditor.cs
- WorkflowTraceTransfer.cs
- LoginStatusDesigner.cs
- Decimal.cs
- SQLBoolean.cs
- SqlMetaData.cs
- Serializer.cs
- XmlAnyAttributeAttribute.cs