Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / DialogResultConverter.cs / 1 / 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 : HuWang - 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 : HuWang - 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
- BookmarkNameHelper.cs
- CompilationSection.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- bidPrivateBase.cs
- ExpressionCopier.cs
- DataView.cs
- CheckableControlBaseAdapter.cs
- LinearGradientBrush.cs
- LogStore.cs
- Accessible.cs
- sqlmetadatafactory.cs
- EditingMode.cs
- RightsManagementManager.cs
- ShapingWorkspace.cs
- DataServiceQueryProvider.cs
- DtdParser.cs
- _AutoWebProxyScriptWrapper.cs
- Menu.cs
- XsdBuildProvider.cs
- HostVisual.cs
- AdapterDictionary.cs
- CustomErrorsSection.cs
- ResXFileRef.cs
- SqlIdentifier.cs
- _BaseOverlappedAsyncResult.cs
- CollectionType.cs
- MessageSecurityOverTcpElement.cs
- ValidatingCollection.cs
- EditingCommands.cs
- DbModificationCommandTree.cs
- IIS7WorkerRequest.cs
- MetabaseSettings.cs
- SHA384.cs
- CryptoKeySecurity.cs
- StringDictionaryWithComparer.cs
- ListViewUpdateEventArgs.cs
- BuildResultCache.cs
- SqlFormatter.cs
- BaseInfoTable.cs
- BlurBitmapEffect.cs
- TextDecoration.cs
- IgnoreFlushAndCloseStream.cs
- BooleanSwitch.cs
- SqlProfileProvider.cs
- DomainUpDown.cs
- Trace.cs
- QilReplaceVisitor.cs
- Descriptor.cs
- DataGridViewMethods.cs
- PrintSystemException.cs
- BindingOperations.cs
- WebCategoryAttribute.cs
- UserPersonalizationStateInfo.cs
- ZoneLinkButton.cs
- FilterException.cs
- Rotation3DAnimationUsingKeyFrames.cs
- _FtpControlStream.cs
- UrlAuthorizationModule.cs
- TypefaceMap.cs
- DBCommand.cs
- RemotingClientProxy.cs
- Automation.cs
- SerializableAttribute.cs
- InvalidCommandTreeException.cs
- TextRangeBase.cs
- StringAttributeCollection.cs
- FileDialog_Vista.cs
- LambdaCompiler.Unary.cs
- PrincipalPermission.cs
- ReachPrintTicketSerializerAsync.cs
- StdValidatorsAndConverters.cs
- GlobalizationSection.cs
- UserControlParser.cs
- TypedServiceOperationListItem.cs
- DynamicILGenerator.cs
- Part.cs
- DataReceivedEventArgs.cs
- DecimalConstantAttribute.cs
- AssemblyName.cs
- ArraySortHelper.cs
- arabicshape.cs
- Types.cs
- Operator.cs
- Vertex.cs
- HtmlEncodedRawTextWriter.cs
- GotoExpression.cs
- HwndSourceParameters.cs
- PolicyStatement.cs
- FontEmbeddingManager.cs
- Screen.cs
- FigureHelper.cs
- ComponentGuaranteesAttribute.cs
- GcHandle.cs
- Int32KeyFrameCollection.cs
- PreloadedPackages.cs
- XmlSortKey.cs
- TypeConverter.cs
- OdbcParameterCollection.cs
- XmlNodeChangedEventArgs.cs
- TreeNodeStyle.cs