Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- VisualTreeHelper.cs
- HelpKeywordAttribute.cs
- HttpApplicationFactory.cs
- CqlLexerHelpers.cs
- TypeElement.cs
- TemplatedAdorner.cs
- SQLBinary.cs
- ScrollEventArgs.cs
- TypeForwardedToAttribute.cs
- DesignerUtility.cs
- ProfileGroupSettingsCollection.cs
- FontEmbeddingManager.cs
- ErrorStyle.cs
- TextBlockAutomationPeer.cs
- ActivityDesigner.cs
- HandleTable.cs
- EventLogException.cs
- BamlStream.cs
- SecurityRequiresReviewAttribute.cs
- SerializationAttributes.cs
- AddValidationError.cs
- ButtonStandardAdapter.cs
- SafeHandles.cs
- OperationContractGenerationContext.cs
- RootNamespaceAttribute.cs
- SingleKeyFrameCollection.cs
- LinearKeyFrames.cs
- TrustLevel.cs
- CaseExpr.cs
- PrintDocument.cs
- M3DUtil.cs
- QuadraticBezierSegment.cs
- CellLabel.cs
- GraphicsState.cs
- XmlAnyElementAttributes.cs
- UrlPath.cs
- CompoundFileReference.cs
- OutputCacheProfile.cs
- MonthCalendar.cs
- DataGridViewTopRowAccessibleObject.cs
- Clipboard.cs
- FormsIdentity.cs
- FlowDocumentScrollViewer.cs
- SaveFileDialog.cs
- UnlockInstanceAsyncResult.cs
- HScrollProperties.cs
- BindingExpressionBase.cs
- FileLoadException.cs
- CodeMethodReturnStatement.cs
- Condition.cs
- RotateTransform3D.cs
- TileBrush.cs
- IdentityHolder.cs
- ColumnResizeAdorner.cs
- WmpBitmapDecoder.cs
- SortExpressionBuilder.cs
- MarkerProperties.cs
- _BufferOffsetSize.cs
- TextTreeUndo.cs
- WindowsTokenRoleProvider.cs
- DataServiceKeyAttribute.cs
- PersonalizableAttribute.cs
- XmlBaseReader.cs
- Ipv6Element.cs
- DataRelationPropertyDescriptor.cs
- SQLRoleProvider.cs
- RewritingProcessor.cs
- MarkupExtensionParser.cs
- WebEventCodes.cs
- FontDialog.cs
- System.Data.OracleClient_BID.cs
- PreviewPageInfo.cs
- MetadataArtifactLoaderCompositeResource.cs
- FontFamilyValueSerializer.cs
- ScriptDescriptor.cs
- FullTextBreakpoint.cs
- FixedSOMPage.cs
- DisplayNameAttribute.cs
- BrowserCapabilitiesCompiler.cs
- EdmProviderManifest.cs
- EntityDataSourceStatementEditorForm.cs
- TextBox.cs
- FreezableOperations.cs
- SystemColors.cs
- InvariantComparer.cs
- IISUnsafeMethods.cs
- SqlDataSourceConfigureSortForm.cs
- PictureBox.cs
- OleDbErrorCollection.cs
- NotifyIcon.cs
- ToolStripProgressBar.cs
- AdornerLayer.cs
- MetadataArtifactLoaderCompositeResource.cs
- GradientStop.cs
- CompilerGlobalScopeAttribute.cs
- RetrieveVirtualItemEventArgs.cs
- BufferedGraphics.cs
- srgsitem.cs
- MenuStrip.cs
- RemotingSurrogateSelector.cs