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
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- RolePrincipal.cs
- NavigationCommands.cs
- _Connection.cs
- HostedBindingBehavior.cs
- DataGridViewColumnEventArgs.cs
- FormParameter.cs
- WindowsRichEdit.cs
- UnsafeNativeMethods.cs
- DtdParser.cs
- Stack.cs
- UserInitiatedNavigationPermission.cs
- XmlWriterDelegator.cs
- CredentialCache.cs
- DefaultEvaluationContext.cs
- SystemInfo.cs
- SqlDeflator.cs
- COM2ColorConverter.cs
- PanelStyle.cs
- PointF.cs
- ApplicationBuildProvider.cs
- PartitionerQueryOperator.cs
- DbExpressionVisitor.cs
- HoistedLocals.cs
- HwndMouseInputProvider.cs
- DetailsViewPagerRow.cs
- EncodingNLS.cs
- SimpleBitVector32.cs
- InvokeMethodDesigner.xaml.cs
- BitmapPalettes.cs
- DbExpressionBuilder.cs
- XNodeSchemaApplier.cs
- ListViewCommandEventArgs.cs
- DataDesignUtil.cs
- IgnoreFlushAndCloseStream.cs
- Policy.cs
- DeflateEmulationStream.cs
- uribuilder.cs
- COM2PropertyDescriptor.cs
- RegexGroupCollection.cs
- UrlPath.cs
- JoinElimination.cs
- FontDriver.cs
- OverflowException.cs
- NaturalLanguageHyphenator.cs
- Timeline.cs
- DbConnectionOptions.cs
- CrossSiteScriptingValidation.cs
- BoundPropertyEntry.cs
- ProcessInfo.cs
- XmlBoundElement.cs
- PointAnimation.cs
- GlyphRunDrawing.cs
- DataGridViewComboBoxEditingControl.cs
- ISO2022Encoding.cs
- Cell.cs
- ZeroOpNode.cs
- coordinatorfactory.cs
- ReliabilityContractAttribute.cs
- XmlSchemaSet.cs
- InputLangChangeEvent.cs
- DefaultSettingsSection.cs
- URL.cs
- RoutedEvent.cs
- RemoteWebConfigurationHostServer.cs
- EntityWithKeyStrategy.cs
- KnownBoxes.cs
- FunctionUpdateCommand.cs
- SharedUtils.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Point3DCollectionConverter.cs
- Int16Animation.cs
- Permission.cs
- SpnEndpointIdentity.cs
- NavigatingCancelEventArgs.cs
- Conditional.cs
- SimpleHandlerBuildProvider.cs
- PaperSize.cs
- Cursor.cs
- BaseCAMarshaler.cs
- AutomationPropertyInfo.cs
- Section.cs
- IgnoreSection.cs
- SvcMapFileLoader.cs
- FileDialog.cs
- TypographyProperties.cs
- WmlPanelAdapter.cs
- Figure.cs
- webclient.cs
- RawMouseInputReport.cs
- DesignerResources.cs
- ScrollContentPresenter.cs
- DataGridState.cs
- UserPreferenceChangedEventArgs.cs
- ColumnCollection.cs
- OdbcParameter.cs
- _LocalDataStoreMgr.cs
- DiagnosticTraceSource.cs
- MouseGestureValueSerializer.cs
- DbParameterCollectionHelper.cs