Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Base / System / Windows / Converters / Generated / SizeValueSerializer.cs / 1305600 / SizeValueSerializer.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 { ////// SizeValueSerializer - ValueSerializer class for converting instances of strings to and from Size instances /// This is used by the MarkupWriter class. /// public class SizeValueSerializer : 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 Size)) { return false; } return true; } ////// Converts a string into a Size. /// public override object ConvertFromString(string value, IValueSerializerContext context) { if (value != null) { return Size.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 Size) { Size instance = (Size) 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
- DataGridViewComboBoxColumn.cs
- IdentityReference.cs
- ScriptBehaviorDescriptor.cs
- HtmlInputHidden.cs
- SoapSchemaMember.cs
- OutputChannelBinder.cs
- SqlCacheDependencyDatabase.cs
- ToolboxItemCollection.cs
- BamlMapTable.cs
- ObjectListCommandsPage.cs
- UrlAuthFailedErrorFormatter.cs
- RolePrincipal.cs
- SqlCharStream.cs
- WindowsListViewItem.cs
- TreeNodeStyleCollection.cs
- Brush.cs
- CanExecuteRoutedEventArgs.cs
- DataBindingHandlerAttribute.cs
- DataMemberAttribute.cs
- EntityDataSourceState.cs
- DataGridViewCellStyleEditor.cs
- ForceCopyBuildProvider.cs
- TraceFilter.cs
- PageFunction.cs
- HMACSHA512.cs
- IndexerHelper.cs
- ValidationRule.cs
- RelatedView.cs
- Rectangle.cs
- ClrPerspective.cs
- filewebresponse.cs
- SqlUdtInfo.cs
- DateTime.cs
- GroupQuery.cs
- CatalogZone.cs
- ReaderWriterLockWrapper.cs
- ZipIOCentralDirectoryBlock.cs
- InfoCardServiceInstallComponent.cs
- NetCodeGroup.cs
- GetPageCompletedEventArgs.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- RsaKeyIdentifierClause.cs
- PeerPresenceInfo.cs
- RoleGroupCollectionEditor.cs
- DecimalFormatter.cs
- unitconverter.cs
- ConfigPathUtility.cs
- ToolStripGripRenderEventArgs.cs
- StringInfo.cs
- WebRequestModuleElementCollection.cs
- documentsequencetextcontainer.cs
- MarshalByRefObject.cs
- RegexMatchCollection.cs
- ConnectionsZoneAutoFormat.cs
- WindowsListViewScroll.cs
- XmlSiteMapProvider.cs
- EmptyControlCollection.cs
- GlobalizationSection.cs
- formatter.cs
- FontDriver.cs
- PolyLineSegmentFigureLogic.cs
- RequestQueue.cs
- WrappedIUnknown.cs
- Icon.cs
- HttpCapabilitiesBase.cs
- DetailsViewRow.cs
- __TransparentProxy.cs
- MultiTargetingUtil.cs
- ConfigXmlElement.cs
- FilteredDataSetHelper.cs
- ExecutionContext.cs
- TailCallAnalyzer.cs
- MouseButtonEventArgs.cs
- PathFigureCollectionConverter.cs
- ChildTable.cs
- remotingproxy.cs
- UniqueContractNameValidationBehavior.cs
- ParserStreamGeometryContext.cs
- QueryOperationResponseOfT.cs
- Thread.cs
- DataServiceHost.cs
- NotSupportedException.cs
- ScopelessEnumAttribute.cs
- Schema.cs
- ListBoxItemAutomationPeer.cs
- PaperSource.cs
- MembershipSection.cs
- SqlNotificationEventArgs.cs
- ResourceFallbackManager.cs
- StyleXamlParser.cs
- StructuralCache.cs
- NativeObjectSecurity.cs
- ToolBar.cs
- SelectedDatesCollection.cs
- DateTimeUtil.cs
- ToolStrip.cs
- BooleanExpr.cs
- ContainerControl.cs
- SingleObjectCollection.cs
- D3DImage.cs