Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Media / Brush.cs / 1 / Brush.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: Brush.cs // // Description: This file contains the implementation of Brush. // Brush is the abstract base class which describes how to fill // a geometric area. // // History: // 04/28/2003 : [....] - Created it. // //--------------------------------------------------------------------------- using MS.Internal; using System; using System.IO; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; using System.Windows.Markup; using MS.Internal.Serialization; using SR=MS.Internal.PresentationCore.SR; using SRID=MS.Internal.PresentationCore.SRID; namespace System.Windows.Media { ////// Brush - /// A brush is an object that represents a method to fill a plane. /// In addition to being able to fill a plane in an absolute way, /// Brushes are also able to adapt how they fill the plane to the /// size of the object that they are used to fill. /// [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)] public abstract partial class Brush : Animatable, IFormattable { #region Constructors ////// Protected constructor for Brush. /// Sets all values to their defaults. /// To set property values, use the constructor which accepts paramters /// protected Brush() { } #endregion Constructors #region Realization Support ////// Derived classes must override this method and update realizations on dependent /// resources if required. /// internal virtual void UpdateRealizations(Rect fillShapeBounds, RealizationContext ctx) { return; } #endregion #region ToString ////// Parse - this method is called by the type converter to parse a Brush's string /// (provided in "value") with the given IFormatProvider. /// ////// A Brush which was created by parsing the "value". /// /// String representation of a Brush. Cannot be null/empty. /// The ITypeDescriptorContext for this call. internal static Brush Parse(string value, ITypeDescriptorContext context) { Brush brush; IFreezeFreezables freezer = null; if (context != null) { freezer = (IFreezeFreezables)context.GetService(typeof(IFreezeFreezables)); if ((freezer != null) && freezer.FreezeFreezables) { brush = (Brush)freezer.TryGetFreezable(value); if (brush != null) { return brush; } } } brush = Parsers.ParseBrush(value, CultureInfo.GetCultureInfo("en-us"), context); if ((brush != null) && (freezer != null)) { freezer.TryFreeze(value, brush); } return brush; } ////// Can serialze "this" to a string /// internal virtual bool CanSerializeToString() { return false; } #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
- SmiTypedGetterSetter.cs
- RegexGroupCollection.cs
- MobileCategoryAttribute.cs
- GenerateHelper.cs
- XPathDocumentBuilder.cs
- CodeDirectoryCompiler.cs
- OracleEncoding.cs
- AttributeCollection.cs
- NotImplementedException.cs
- DESCryptoServiceProvider.cs
- OdbcConnectionStringbuilder.cs
- ToolStripDropDownClosingEventArgs.cs
- LongCountAggregationOperator.cs
- LinkTarget.cs
- SizeChangedInfo.cs
- IsolatedStoragePermission.cs
- InternalTypeHelper.cs
- SpellerError.cs
- MemoryMappedFileSecurity.cs
- ToolStripItemTextRenderEventArgs.cs
- DoubleAverageAggregationOperator.cs
- AssociationProvider.cs
- QilInvoke.cs
- CodeSnippetStatement.cs
- invalidudtexception.cs
- AssociationSet.cs
- AppSettingsExpressionBuilder.cs
- FontFamilyIdentifier.cs
- SchemaCollectionCompiler.cs
- DecimalConstantAttribute.cs
- AdornerLayer.cs
- COM2PropertyBuilderUITypeEditor.cs
- AuthenticatingEventArgs.cs
- TextProperties.cs
- SecureStringHasher.cs
- ArrangedElement.cs
- SystemIcmpV4Statistics.cs
- BCLDebug.cs
- Registry.cs
- ResourcePermissionBase.cs
- HitTestResult.cs
- Rfc4050KeyFormatter.cs
- BinaryFormatterWriter.cs
- GatewayDefinition.cs
- SqlDataSourceCache.cs
- ElementUtil.cs
- Object.cs
- ServiceHostingEnvironment.cs
- Int64Storage.cs
- XamlHostingSection.cs
- diagnosticsswitches.cs
- SafeNativeMethodsOther.cs
- JoinTreeNode.cs
- WindowsIdentity.cs
- AnnotationHighlightLayer.cs
- ReadOnlyMetadataCollection.cs
- IteratorFilter.cs
- WebPartAuthorizationEventArgs.cs
- IdleTimeoutMonitor.cs
- ScrollBar.cs
- ContentFileHelper.cs
- CoreChannel.cs
- BinaryFormatter.cs
- CounterSampleCalculator.cs
- WeakReference.cs
- ConnectionStringsExpressionBuilder.cs
- DeviceFiltersSection.cs
- AssemblyFilter.cs
- SafeThreadHandle.cs
- SqlMethods.cs
- VectorAnimationBase.cs
- TransformConverter.cs
- UserValidatedEventArgs.cs
- SchemaObjectWriter.cs
- BulletedListEventArgs.cs
- UserPersonalizationStateInfo.cs
- SessionViewState.cs
- DataRelationCollection.cs
- XPathMessageFilter.cs
- Inflater.cs
- AdornerHitTestResult.cs
- CompiledRegexRunner.cs
- __ConsoleStream.cs
- WebControlParameterProxy.cs
- WCFModelStrings.Designer.cs
- BindingContext.cs
- FormsAuthenticationTicket.cs
- Literal.cs
- CustomWebEventKey.cs
- CompoundFileReference.cs
- FileChangesMonitor.cs
- SystemColorTracker.cs
- DBPropSet.cs
- HashSetEqualityComparer.cs
- EventItfInfo.cs
- TileBrush.cs
- CreatingCookieEventArgs.cs
- TextServicesDisplayAttribute.cs
- FlagsAttribute.cs
- ToolBarButtonClickEvent.cs