Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Core.Presentation / System / Activities / Core / Presentation / VerticalConnector.xaml.cs / 1305376 / VerticalConnector.xaml.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Core.Presentation { using System.Activities.Presentation.Hosting; using System.Activities.Presentation; using System.Windows; using System.Windows.Media.Animation; partial class VerticalConnector { public static readonly DependencyProperty AllowedItemTypeProperty = DependencyProperty.Register("AllowedItemType", typeof(Type), typeof(VerticalConnector), new UIPropertyMetadata(typeof(object))); public static readonly DependencyProperty ContextProperty = DependencyProperty.Register( "Context", typeof(EditingContext), typeof(VerticalConnector)); public VerticalConnector() { this.InitializeComponent(); } public Type AllowedItemType { get { return (Type)GetValue(AllowedItemTypeProperty); } set { SetValue(AllowedItemTypeProperty, value); } } public EditingContext Context { get { return (EditingContext)GetValue(ContextProperty); } set { SetValue(ContextProperty, value); } } protected override void OnDragEnter(DragEventArgs e) { CheckAnimate(e, "Expand"); this.dropTarget.Visibility = Visibility.Visible; } protected override void OnDragLeave(DragEventArgs e) { CheckAnimate(e, "Collapse"); this.dropTarget.Visibility = Visibility.Collapsed; } protected override void OnDrop(DragEventArgs e) { this.dropTarget.Visibility = Visibility.Collapsed; base.OnDrop(e); } void CheckAnimate(DragEventArgs e, string storyboardResourceName) { if (!e.Handled) { if (!this.Context.Items.GetValue().IsReadOnly && DragDropHelper.AllowDrop(e.Data, this.Context, this.AllowedItemType)) { BeginStoryboard((Storyboard)this.Resources[storyboardResourceName]); return; } else { e.Effects = DragDropEffects.None; } e.Handled = true; } } } } // 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
- X509ChainPolicy.cs
- DesignerForm.cs
- HighlightVisual.cs
- IApplicationTrustManager.cs
- CoordinationService.cs
- EraserBehavior.cs
- CannotUnloadAppDomainException.cs
- RefreshEventArgs.cs
- UrlParameterReader.cs
- KeyboardDevice.cs
- TableLayoutCellPaintEventArgs.cs
- XamlHttpHandlerFactory.cs
- PhysicalFontFamily.cs
- VectorCollectionValueSerializer.cs
- DataControlImageButton.cs
- EncryptedPackageFilter.cs
- oledbmetadatacollectionnames.cs
- WmlImageAdapter.cs
- AmbiguousMatchException.cs
- SchemaNotation.cs
- GroupBox.cs
- FunctionUpdateCommand.cs
- AssemblySettingAttributes.cs
- WebPartVerb.cs
- HijriCalendar.cs
- ClientCultureInfo.cs
- RadioButtonFlatAdapter.cs
- followingquery.cs
- MaskedTextBoxDesigner.cs
- SpellCheck.cs
- LocationReference.cs
- ScrollPattern.cs
- ViewStateChangedEventArgs.cs
- AssemblyNameProxy.cs
- HttpHandlerAction.cs
- LicFileLicenseProvider.cs
- CommandCollectionEditor.cs
- Parallel.cs
- OleDbErrorCollection.cs
- TreeView.cs
- ListViewInsertedEventArgs.cs
- CursorInteropHelper.cs
- OleDbSchemaGuid.cs
- PageAction.cs
- MenuItemAutomationPeer.cs
- ValueOfAction.cs
- CuspData.cs
- AssemblySettingAttributes.cs
- ContextMenu.cs
- RotateTransform.cs
- SemaphoreSecurity.cs
- SessionParameter.cs
- WebBrowsableAttribute.cs
- FileUpload.cs
- HtmlInputRadioButton.cs
- RequestCachePolicy.cs
- InvalidEnumArgumentException.cs
- LogEntryHeaderDeserializer.cs
- PropertyGroupDescription.cs
- SqlDeflator.cs
- CodeGotoStatement.cs
- StrongNameIdentityPermission.cs
- Script.cs
- BitStream.cs
- cookie.cs
- CompositeScriptReference.cs
- Style.cs
- DataSetMappper.cs
- RunWorkerCompletedEventArgs.cs
- IdentityHolder.cs
- SymLanguageType.cs
- KeyValueSerializer.cs
- UInt16Converter.cs
- cookiecontainer.cs
- SqlXml.cs
- sortedlist.cs
- FrameworkElementAutomationPeer.cs
- CollectionBuilder.cs
- DateRangeEvent.cs
- StringFormat.cs
- PropertyMapper.cs
- Compensate.cs
- SQLBoolean.cs
- ColumnWidthChangedEvent.cs
- CodeAssignStatement.cs
- DurableInstanceManager.cs
- WebMethodAttribute.cs
- IRCollection.cs
- KeyMatchBuilder.cs
- TextParaClient.cs
- WmfPlaceableFileHeader.cs
- ImmutableObjectAttribute.cs
- ImageCodecInfoPrivate.cs
- TextTreeTextElementNode.cs
- CursorConverter.cs
- DrawingState.cs
- SamlNameIdentifierClaimResource.cs
- EditorPartCollection.cs
- PolyQuadraticBezierSegment.cs
- Int32Rect.cs