Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Converters / Generated / RectValueSerializer.cs / 1305600 / RectValueSerializer.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see http://wiki/default.aspx/Microsoft.Projects.Avalon/MilCodeGen.html for more information. // //--------------------------------------------------------------------------- using MS.Internal; using MS.Internal.WindowsBase; using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.InteropServices; using System.ComponentModel.Design.Serialization; using System.Windows.Markup; using System.Windows.Converters; using System.Windows; #pragma warning disable 1634, 1691 // suppressing PreSharp warnings namespace System.Windows.Converters { ////// RectValueSerializer - ValueSerializer class for converting instances of strings to and from Rect instances /// This is used by the MarkupWriter class. /// public class RectValueSerializer : ValueSerializer { ////// Returns true. /// public override bool CanConvertFromString(string value, IValueSerializerContext context) { return true; } ////// Returns true if the given value can be converted into a string /// public override bool CanConvertToString(object value, IValueSerializerContext context) { // Validate the input type if (!(value is Rect)) { return false; } return true; } ////// Converts a string into a Rect. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Rect.Parse(value ); } else { return base.ConvertFromString( value, context ); } } ////// Converts the value into a string. /// public override string ConvertToString(object value, IValueSerializerContext context) { if (value is Rect) { Rect instance = (Rect) value; #pragma warning suppress 6506 // instance is obviously not null return instance.ConvertToString(null, System.Windows.Markup.TypeConverterHelper.InvariantEnglishUS); } return base.ConvertToString(value, context); } } } // 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
- XmlReturnReader.cs
- _BufferOffsetSize.cs
- PlatformCulture.cs
- CodeExpressionStatement.cs
- Subordinate.cs
- x509utils.cs
- WebPartCloseVerb.cs
- ModifierKeysValueSerializer.cs
- sqlmetadatafactory.cs
- DocumentSchemaValidator.cs
- ListViewPagedDataSource.cs
- CoreSwitches.cs
- EventDescriptorCollection.cs
- TypeCollectionDesigner.xaml.cs
- OdbcUtils.cs
- BindingContext.cs
- FunctionNode.cs
- CapacityStreamGeometryContext.cs
- AssemblyFilter.cs
- PasswordRecovery.cs
- BitmapEffectRenderDataResource.cs
- CodeNamespaceCollection.cs
- Rect3DValueSerializer.cs
- MapPathBasedVirtualPathProvider.cs
- NameScope.cs
- CodeAttributeDeclarationCollection.cs
- sqlinternaltransaction.cs
- ToolStripDropDownClosedEventArgs.cs
- ResXFileRef.cs
- DefaultAuthorizationContext.cs
- Tuple.cs
- MessageQueueKey.cs
- AlignmentXValidation.cs
- InternalTypeHelper.cs
- SqlConnectionHelper.cs
- ProcessHostServerConfig.cs
- PropertyMap.cs
- AspNetHostingPermission.cs
- TemplatePropertyEntry.cs
- Stylesheet.cs
- FontCollection.cs
- nulltextnavigator.cs
- SqlProfileProvider.cs
- DtcInterfaces.cs
- ProviderCommandInfoUtils.cs
- TraceListener.cs
- MsmqIntegrationReceiveParameters.cs
- OledbConnectionStringbuilder.cs
- ObjectListDesigner.cs
- TreeNodeCollection.cs
- ConnectionManagementElementCollection.cs
- SmiRecordBuffer.cs
- BitmapEffectGroup.cs
- MultipleViewProviderWrapper.cs
- DataBindingValueUIHandler.cs
- PageThemeParser.cs
- SqlDataSourceConfigureSelectPanel.cs
- SwitchElementsCollection.cs
- EventArgs.cs
- UserControl.cs
- TableItemPattern.cs
- CodeCommentStatementCollection.cs
- WindowsFormsHostPropertyMap.cs
- ExpressionNode.cs
- WebBaseEventKeyComparer.cs
- ComplexObject.cs
- sqlcontext.cs
- StreamGeometryContext.cs
- ObjectAnimationUsingKeyFrames.cs
- RegularExpressionValidator.cs
- InvalidEnumArgumentException.cs
- UntrustedRecipientException.cs
- InteropBitmapSource.cs
- AppDomainGrammarProxy.cs
- GradientStop.cs
- UnsettableComboBox.cs
- ColumnMapVisitor.cs
- ReturnValue.cs
- Query.cs
- MethodCallConverter.cs
- ValueUnavailableException.cs
- COM2EnumConverter.cs
- SyndicationDeserializer.cs
- DataBindingExpressionBuilder.cs
- MessageQuerySet.cs
- MediaElement.cs
- Identity.cs
- XmlWhitespace.cs
- EditorZone.cs
- PanelStyle.cs
- SpnegoTokenAuthenticator.cs
- BooleanExpr.cs
- TypeTypeConverter.cs
- OptimalBreakSession.cs
- StopStoryboard.cs
- ResXDataNode.cs
- Dictionary.cs
- BaseDataList.cs
- XmlSchemaObjectCollection.cs
- TextAnchor.cs