Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / System / Windows / Converters / Generated / RectValueSerializer.cs / 1 / RectValueSerializer.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // This file was generated, please do not edit it directly. // // Please see [....]/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)) { throw new ArgumentException(SR.Get(SRID.General_Expected_Type, "Rect"), "value"); } 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, CultureInfo.GetCultureInfo("en-us") ); } 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
- SerialPort.cs
- BaseCodeDomTreeGenerator.cs
- StylusEventArgs.cs
- ScriptingProfileServiceSection.cs
- XmlSchemaValidationException.cs
- Internal.cs
- ObjectSet.cs
- HuffCodec.cs
- XamlStream.cs
- BidOverLoads.cs
- CodeStatementCollection.cs
- SEHException.cs
- TextElementCollectionHelper.cs
- SHA1CryptoServiceProvider.cs
- NaturalLanguageHyphenator.cs
- StorageComplexPropertyMapping.cs
- PropertyNames.cs
- PersonalizablePropertyEntry.cs
- EdmToObjectNamespaceMap.cs
- GroupBoxRenderer.cs
- TrayIconDesigner.cs
- TriggerActionCollection.cs
- FastEncoderWindow.cs
- PropertyChangingEventArgs.cs
- SuppressIldasmAttribute.cs
- UnmanagedMarshal.cs
- RecommendedAsConfigurableAttribute.cs
- SubqueryTrackingVisitor.cs
- ObjectManager.cs
- Restrictions.cs
- SiteMapNode.cs
- DetailsViewUpdatedEventArgs.cs
- LogicalCallContext.cs
- TrustManager.cs
- TreeIterator.cs
- RequiredFieldValidator.cs
- WebPartVerb.cs
- AssertValidation.cs
- WindowsListView.cs
- TextEditorThreadLocalStore.cs
- TemplatePartAttribute.cs
- ScriptBehaviorDescriptor.cs
- QilFunction.cs
- GenericEnumerator.cs
- BitArray.cs
- GeometryDrawing.cs
- BufferedResponseStream.cs
- XXXOnTypeBuilderInstantiation.cs
- uribuilder.cs
- DataObjectFieldAttribute.cs
- IPAddressCollection.cs
- ColorConverter.cs
- ViewSimplifier.cs
- TabItemWrapperAutomationPeer.cs
- ControlBindingsCollection.cs
- FixedSOMContainer.cs
- HiddenFieldPageStatePersister.cs
- MetaDataInfo.cs
- RecordConverter.cs
- WebPartMenuStyle.cs
- DependencyProperty.cs
- SiteOfOriginContainer.cs
- configsystem.cs
- IntSumAggregationOperator.cs
- FrameworkElementAutomationPeer.cs
- ConditionCollection.cs
- LabelLiteral.cs
- PtsHelper.cs
- ActivityExecutionFilter.cs
- MDIWindowDialog.cs
- SqlDelegatedTransaction.cs
- _SslSessionsCache.cs
- DashStyle.cs
- cookiecontainer.cs
- ellipse.cs
- CacheSection.cs
- iisPickupDirectory.cs
- LayoutTable.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ResourceDescriptionAttribute.cs
- GPPOINTF.cs
- OrCondition.cs
- ToggleProviderWrapper.cs
- TreeNodeStyleCollection.cs
- SamlAssertionKeyIdentifierClause.cs
- SwitchExpression.cs
- WaitHandle.cs
- ProcessModelInfo.cs
- DataServiceRequestOfT.cs
- ConnectionInterfaceCollection.cs
- XmlDocument.cs
- XMLUtil.cs
- Trace.cs
- ContextProperty.cs
- ErrorHandler.cs
- CustomServiceCredentials.cs
- Win32SafeHandles.cs
- SecUtil.cs
- CodeSubDirectory.cs
- ClientWindowsAuthenticationMembershipProvider.cs