Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Shapes / path.cs / 1305600 / path.cs
//---------------------------------------------------------------------------- // File: Path.cs // // Description: // Implementation of Path shape element. // // History: // 05/30/02 - [....] - Created. // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System.Windows.Shapes; using System.Diagnostics; using System.Windows.Threading; using System.Security; using System.Security.Permissions; using System.Windows; using System.Windows.Media; using System; using MS.Internal.PresentationFramework; namespace System.Windows.Shapes { ////// The Path shape element /// This element (like all shapes) belongs under a Canvas, /// and will be presented by the parent canvas. /// Since a Path is really a path which closes its path /// public sealed class Path : Shape { #region Constructors ////// Instantiates a new instance of a Path. /// public Path() { } #endregion Constructors #region Dynamic Properties ////// Data property /// [CommonDependencyProperty] public static readonly DependencyProperty DataProperty = DependencyProperty.Register( "Data", typeof(Geometry), typeof(Path), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender), null); ////// Data property /// public Geometry Data { get { return (Geometry)GetValue(DataProperty); } set { SetValue(DataProperty, value); } } #endregion #region Protected Methods and Properties ////// Get the path that defines this shape /// protected override Geometry DefiningGeometry { get { Geometry data = Data; if (data == null) { data = Geometry.Empty; } return data; } } // // This property // 1. Finds the correct initial size for the _effectiveValues store on the current DependencyObject // 2. This is a performance optimization // internal override int EffectiveValuesInitialSize { get { return 13; } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // File: Path.cs // // Description: // Implementation of Path shape element. // // History: // 05/30/02 - [....] - Created. // // Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System.Windows.Shapes; using System.Diagnostics; using System.Windows.Threading; using System.Security; using System.Security.Permissions; using System.Windows; using System.Windows.Media; using System; using MS.Internal.PresentationFramework; namespace System.Windows.Shapes { ////// The Path shape element /// This element (like all shapes) belongs under a Canvas, /// and will be presented by the parent canvas. /// Since a Path is really a path which closes its path /// public sealed class Path : Shape { #region Constructors ////// Instantiates a new instance of a Path. /// public Path() { } #endregion Constructors #region Dynamic Properties ////// Data property /// [CommonDependencyProperty] public static readonly DependencyProperty DataProperty = DependencyProperty.Register( "Data", typeof(Geometry), typeof(Path), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender), null); ////// Data property /// public Geometry Data { get { return (Geometry)GetValue(DataProperty); } set { SetValue(DataProperty, value); } } #endregion #region Protected Methods and Properties ////// Get the path that defines this shape /// protected override Geometry DefiningGeometry { get { Geometry data = Data; if (data == null) { data = Geometry.Empty; } return data; } } // // This property // 1. Finds the correct initial size for the _effectiveValues store on the current DependencyObject // 2. This is a performance optimization // internal override int EffectiveValuesInitialSize { get { return 13; } } #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
- AutomationEvent.cs
- AmbientLight.cs
- GetMemberBinder.cs
- TextEditorParagraphs.cs
- AddInAdapter.cs
- PassportPrincipal.cs
- XPathPatternParser.cs
- DataServiceRequestArgs.cs
- OutputWindow.cs
- WebBrowserPermission.cs
- ProbeMatchesMessageCD1.cs
- TargetControlTypeAttribute.cs
- ICollection.cs
- TypeListConverter.cs
- Literal.cs
- ReadOnlyState.cs
- CustomValidator.cs
- BlurEffect.cs
- RowTypePropertyElement.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- GlobalItem.cs
- SystemWebCachingSectionGroup.cs
- CodeDefaultValueExpression.cs
- DesignerObject.cs
- WindowsListViewItemCheckBox.cs
- ReadOnlyPermissionSet.cs
- InvokeGenerator.cs
- CustomWebEventKey.cs
- SrgsToken.cs
- remotingproxy.cs
- SortAction.cs
- KernelTypeValidation.cs
- HandlerBase.cs
- KoreanCalendar.cs
- ByteKeyFrameCollection.cs
- EventProxy.cs
- ManagementInstaller.cs
- SafePEFileHandle.cs
- DefaultPropertyAttribute.cs
- _FixedSizeReader.cs
- IntSumAggregationOperator.cs
- DisplayNameAttribute.cs
- DataListComponentEditor.cs
- _NegoStream.cs
- ToolStripActionList.cs
- altserialization.cs
- FontFamily.cs
- FontSource.cs
- ComponentResourceKeyConverter.cs
- TranslateTransform3D.cs
- ApplicationException.cs
- NetStream.cs
- SchemaElementDecl.cs
- ConfigsHelper.cs
- WebPartAuthorizationEventArgs.cs
- Math.cs
- CodeTypeReferenceExpression.cs
- VisualTreeHelper.cs
- NonVisualControlAttribute.cs
- UIElementParagraph.cs
- ContentElementAutomationPeer.cs
- StrokeNodeOperations2.cs
- ExceptionCollection.cs
- ContextQuery.cs
- CodeThrowExceptionStatement.cs
- SqlOuterApplyReducer.cs
- PageHandlerFactory.cs
- SubpageParaClient.cs
- SubpageParagraph.cs
- FontUnit.cs
- GeneralTransform.cs
- Parallel.cs
- OleDbParameterCollection.cs
- QueueProcessor.cs
- Item.cs
- SafeEventLogReadHandle.cs
- ServiceSecurityContext.cs
- DoubleCollectionConverter.cs
- ZoneLinkButton.cs
- WmlCalendarAdapter.cs
- ApplicationServicesHostFactory.cs
- DataSvcMapFileSerializer.cs
- RijndaelManagedTransform.cs
- EFTableProvider.cs
- TraceEventCache.cs
- WindowsGraphics2.cs
- DesignerSerializerAttribute.cs
- PreviewKeyDownEventArgs.cs
- HttpRequest.cs
- AlternateView.cs
- SystemWebExtensionsSectionGroup.cs
- PackageRelationship.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- StringToken.cs
- HttpListenerException.cs
- TheQuery.cs
- FixedSOMImage.cs
- TextPatternIdentifiers.cs
- TimersDescriptionAttribute.cs
- ExpressionPrinter.cs