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
- MemoryFailPoint.cs
- CqlLexer.cs
- CompilerGlobalScopeAttribute.cs
- PartialList.cs
- OperationInvokerTrace.cs
- WebHeaderCollection.cs
- DbMetaDataCollectionNames.cs
- DisplayMemberTemplateSelector.cs
- XmlArrayItemAttribute.cs
- FrameworkContentElementAutomationPeer.cs
- OperationInvokerTrace.cs
- ErrorHandler.cs
- SchemaMerger.cs
- TagMapInfo.cs
- MultiTargetingUtil.cs
- PipelineModuleStepContainer.cs
- SqlProviderManifest.cs
- dataprotectionpermissionattribute.cs
- RenderData.cs
- TraceXPathNavigator.cs
- TableMethodGenerator.cs
- RegexNode.cs
- ELinqQueryState.cs
- PrintDialog.cs
- WaitHandleCannotBeOpenedException.cs
- LayoutEvent.cs
- WorkflowInvoker.cs
- SolidColorBrush.cs
- AssociationTypeEmitter.cs
- QilParameter.cs
- Stopwatch.cs
- DbCommandDefinition.cs
- xmlformatgeneratorstatics.cs
- FocusTracker.cs
- StylusPointPropertyId.cs
- TypeFieldSchema.cs
- WebReferencesBuildProvider.cs
- TextCompositionEventArgs.cs
- PointAnimationUsingKeyFrames.cs
- PagerSettings.cs
- DBAsyncResult.cs
- WebPartsSection.cs
- HttpClientCertificate.cs
- DataPagerFieldItem.cs
- InvariantComparer.cs
- RecognitionResult.cs
- SessionState.cs
- SqlInfoMessageEvent.cs
- ItemContainerGenerator.cs
- versioninfo.cs
- ParserContext.cs
- TextSelection.cs
- OleDbError.cs
- ConsoleTraceListener.cs
- SoapElementAttribute.cs
- PrintDialog.cs
- StringValidatorAttribute.cs
- GridViewSortEventArgs.cs
- ItemContainerProviderWrapper.cs
- SecurityTokenProvider.cs
- NegatedCellConstant.cs
- DataBoundControlAdapter.cs
- DbDataSourceEnumerator.cs
- EditorPartCollection.cs
- NeutralResourcesLanguageAttribute.cs
- DataPager.cs
- XmlSerializerFactory.cs
- ErrorWrapper.cs
- EncoderNLS.cs
- ConstraintStruct.cs
- PropertyMetadata.cs
- XhtmlStyleClass.cs
- RefreshEventArgs.cs
- RecipientInfo.cs
- DefaultTextStoreTextComposition.cs
- odbcmetadatacollectionnames.cs
- ByteArrayHelperWithString.cs
- PageTheme.cs
- ConstraintConverter.cs
- TopClause.cs
- DefaultTextStoreTextComposition.cs
- WebPartEditorApplyVerb.cs
- StringInfo.cs
- SqlFlattener.cs
- WebPartManagerDesigner.cs
- IOException.cs
- DataMisalignedException.cs
- TitleStyle.cs
- UserControl.cs
- ResourceReferenceKeyNotFoundException.cs
- StateBag.cs
- UnmanagedMemoryAccessor.cs
- Helper.cs
- DelimitedListTraceListener.cs
- ProfileProvider.cs
- Brush.cs
- DataControlFieldHeaderCell.cs
- ErrorFormatterPage.cs
- DesignTimeParseData.cs
- DBSqlParserColumnCollection.cs