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
- DataGridViewComboBoxColumn.cs
- HtmlWindowCollection.cs
- CompensationTokenData.cs
- InternalConfigHost.cs
- DispatcherSynchronizationContext.cs
- DayRenderEvent.cs
- CacheModeValueSerializer.cs
- XmlCharCheckingReader.cs
- ServiceOperation.cs
- PerformanceCounter.cs
- SerialPort.cs
- HScrollProperties.cs
- EntityDataSourceContextCreatedEventArgs.cs
- LinkedResource.cs
- DateTimeOffsetConverter.cs
- FindResponse.cs
- AssemblyInfo.cs
- DataGridViewCellStateChangedEventArgs.cs
- RotateTransform3D.cs
- WrappedIUnknown.cs
- ServicesSection.cs
- EncodingTable.cs
- ChannelPoolSettingsElement.cs
- WinFormsComponentEditor.cs
- SafeSecurityHelper.cs
- UnauthorizedAccessException.cs
- LineVisual.cs
- XmlBinaryReaderSession.cs
- UndirectedGraph.cs
- SoapReflectionImporter.cs
- VSWCFServiceContractGenerator.cs
- PriorityBinding.cs
- WebPartZoneBase.cs
- DetailsViewRowCollection.cs
- InputScopeConverter.cs
- Missing.cs
- ColorKeyFrameCollection.cs
- PeekCompletedEventArgs.cs
- LogEntrySerializer.cs
- LoginNameDesigner.cs
- TypeTypeConverter.cs
- ParallelEnumerable.cs
- BinarySerializer.cs
- DockingAttribute.cs
- WebPartConnectionsConfigureVerb.cs
- NameValueCache.cs
- XAMLParseException.cs
- FilterException.cs
- StickyNote.cs
- SingleTagSectionHandler.cs
- PointLight.cs
- Speller.cs
- XmlTextWriter.cs
- Transform3DCollection.cs
- HtmlGenericControl.cs
- Emitter.cs
- LinkDesigner.cs
- DbConnectionHelper.cs
- CqlLexerHelpers.cs
- ListViewGroupConverter.cs
- KoreanLunisolarCalendar.cs
- WebBrowserNavigatingEventHandler.cs
- InstancePersistenceContext.cs
- WSSecurityTokenSerializer.cs
- BitmapEffectGeneralTransform.cs
- ListBoxItem.cs
- ClientTargetCollection.cs
- DataControlFieldTypeEditor.cs
- CodeIterationStatement.cs
- XPathSelectionIterator.cs
- LogFlushAsyncResult.cs
- WSTrustFeb2005.cs
- String.cs
- EdmValidator.cs
- MethodAccessException.cs
- IndexerNameAttribute.cs
- RuleDefinitions.cs
- SqlRowUpdatedEvent.cs
- XmlSchemaCompilationSettings.cs
- QuaternionValueSerializer.cs
- storepermissionattribute.cs
- WebBrowserHelper.cs
- BookmarkUndoUnit.cs
- Pair.cs
- SetIterators.cs
- ProcessStartInfo.cs
- NameObjectCollectionBase.cs
- FormViewInsertedEventArgs.cs
- DesignerContextDescriptor.cs
- ControlTemplate.cs
- ProvidersHelper.cs
- RSAPKCS1KeyExchangeFormatter.cs
- RegisterResponseInfo.cs
- BitmapCodecInfoInternal.cs
- SymmetricCryptoHandle.cs
- LinqToSqlWrapper.cs
- XmlObjectSerializerReadContextComplex.cs
- ApplicationBuildProvider.cs
- UserPreferenceChangingEventArgs.cs
- ConfigurationManager.cs