Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Core.Presentation / System / Activities / Core / Presentation / Connector.xaml.cs / 1305376 / Connector.xaml.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Activities.Core.Presentation { using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Diagnostics.CodeAnalysis; using System.Runtime; partial class Connector : UserControl { //Label will be shown only if there is one segment in the connector whose length is greater than this. internal const int MinConnectorSegmentLengthForLabel = 30; public static readonly DependencyProperty PointsProperty = DependencyProperty.Register("Points", typeof(PointCollection), typeof(Connector), new FrameworkPropertyMetadata(new PointCollection())); public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register("IsSelected", typeof(bool), typeof(Connector), new FrameworkPropertyMetadata(false)); public static readonly DependencyProperty LabelTextProperty = DependencyProperty.Register("LabelText", typeof(string), typeof(Connector), new FrameworkPropertyMetadata(null)); public static readonly DependencyProperty IdentityProperty = DependencyProperty.Register("Identity", typeof(Guid), typeof(Connector)); public const double ArrowShapeWidth = 5; public Connector() { InitializeComponent(); this.Loaded += (sender, e) => { this.Identity = Guid.NewGuid(); }; } [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "PointCollection is a special WPF class and got special Clone logic, the setter of this property is used several places.")] public PointCollection Points { get { return (PointCollection)GetValue(Connector.PointsProperty); } set { SetValue(Connector.PointsProperty, value); } } public bool IsSelected { get { return (bool)GetValue(Connector.IsSelectedProperty); } set { SetValue(Connector.IsSelectedProperty, value); } } public string LabelText { get { return (string)GetValue(Connector.LabelTextProperty); } set { SetValue(Connector.LabelTextProperty, value); } } public Guid Identity { get { return (Guid)GetValue(Connector.IdentityProperty); } set { SetValue(Connector.IdentityProperty, value); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataControlLinkButton.cs
- XmlILAnnotation.cs
- CurrencyManager.cs
- CompressEmulationStream.cs
- NameSpaceExtractor.cs
- TabItemAutomationPeer.cs
- SeparatorAutomationPeer.cs
- CustomErrorsSection.cs
- ObjectAnimationUsingKeyFrames.cs
- MenuItemBinding.cs
- IdentifierService.cs
- UnsafeNetInfoNativeMethods.cs
- SoapIncludeAttribute.cs
- ToolStripPanelSelectionGlyph.cs
- URI.cs
- TakeQueryOptionExpression.cs
- HttpInputStream.cs
- ConfigLoader.cs
- CellQuery.cs
- ExtensionDataReader.cs
- AspNetCacheProfileAttribute.cs
- Translator.cs
- ProxyWebPartManager.cs
- KnownBoxes.cs
- TrackingValidationObjectDictionary.cs
- DataPointer.cs
- AbstractDataSvcMapFileLoader.cs
- RSAPKCS1SignatureFormatter.cs
- AliasGenerator.cs
- SmiEventSink_DeferedProcessing.cs
- _HeaderInfoTable.cs
- TableColumnCollection.cs
- RelatedImageListAttribute.cs
- SpecularMaterial.cs
- ConstraintCollection.cs
- PeerCollaborationPermission.cs
- Size.cs
- XPathNavigatorKeyComparer.cs
- unitconverter.cs
- MsmqElementBase.cs
- ParseHttpDate.cs
- ListViewItem.cs
- TempFiles.cs
- ListViewContainer.cs
- TrustLevel.cs
- HMACSHA1.cs
- OleDbPermission.cs
- DiscoveryDocumentLinksPattern.cs
- Visual3D.cs
- FontCollection.cs
- XmlJsonReader.cs
- DataShape.cs
- ImpersonateTokenRef.cs
- DropSource.cs
- Attributes.cs
- FileDialogPermission.cs
- HMACSHA512.cs
- Vars.cs
- FontStyles.cs
- ThrowHelper.cs
- SecureConversationSecurityTokenParameters.cs
- DispatcherExceptionFilterEventArgs.cs
- PrintControllerWithStatusDialog.cs
- ProtectedProviderSettings.cs
- BufferModeSettings.cs
- GlyphElement.cs
- ToolStripLocationCancelEventArgs.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- SqlDataSourceCache.cs
- DataGridCommandEventArgs.cs
- BatchParser.cs
- BypassElement.cs
- StackBuilderSink.cs
- UInt16Converter.cs
- SizeF.cs
- DataBinder.cs
- TextServicesCompartmentEventSink.cs
- DataList.cs
- Boolean.cs
- LineServicesCallbacks.cs
- ProcessHostServerConfig.cs
- QueryPageSettingsEventArgs.cs
- UIElementIsland.cs
- ToolTip.cs
- ValueUnavailableException.cs
- CornerRadiusConverter.cs
- ExpandSegment.cs
- RepeaterItem.cs
- SafeArrayTypeMismatchException.cs
- RMEnrollmentPage2.cs
- RichTextBox.cs
- MsmqInputChannelBase.cs
- SuppressMergeCheckAttribute.cs
- XPathDocumentIterator.cs
- Roles.cs
- DBNull.cs
- LabelExpression.cs
- HyperLinkField.cs
- List.cs
- URIFormatException.cs