Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Core.Presentation / System / Activities / Core / Presentation / ParallelSeparator.xaml.cs / 1305376 / ParallelSeparator.xaml.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Core.Presentation { using System.Activities.Presentation; using System.Activities.Presentation.Hosting; using System.Windows; using System.Windows.Media.Animation; partial class ParallelSeparator { public static readonly DependencyProperty AllowedItemTypeProperty = DependencyProperty.Register("AllowedItemType", typeof(Type), typeof(ParallelSeparator), new UIPropertyMetadata(typeof(object))); public static readonly DependencyProperty ContextProperty = DependencyProperty.Register( "Context", typeof(EditingContext), typeof(ParallelSeparator)); public ParallelSeparator() { 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
- ADMembershipProvider.cs
- BitmapEffectDrawing.cs
- GZipStream.cs
- ModuleBuilder.cs
- ListItemConverter.cs
- Line.cs
- IdnElement.cs
- Soap12ServerProtocol.cs
- WeakRefEnumerator.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- TextWriterEngine.cs
- CheckBoxBaseAdapter.cs
- XmlSchemaImport.cs
- Ray3DHitTestResult.cs
- MatrixAnimationUsingPath.cs
- Permission.cs
- DataGridViewRowsRemovedEventArgs.cs
- TextDecorations.cs
- RectAnimationClockResource.cs
- EndpointReference.cs
- BasicAsyncResult.cs
- CodeAttributeArgumentCollection.cs
- LicenseContext.cs
- EntityException.cs
- ScrollViewerAutomationPeer.cs
- LinqDataSource.cs
- Trace.cs
- FreeFormDragDropManager.cs
- SrgsElementList.cs
- ListControlConvertEventArgs.cs
- ShimAsPublicXamlType.cs
- LateBoundChannelParameterCollection.cs
- FormsAuthenticationCredentials.cs
- BCryptSafeHandles.cs
- SplitContainer.cs
- PatternMatcher.cs
- BasicCellRelation.cs
- UnsafeNativeMethods.cs
- DataSetFieldSchema.cs
- BinaryMethodMessage.cs
- MenuItemAutomationPeer.cs
- EntityDataReader.cs
- ReferenceEqualityComparer.cs
- IndexedString.cs
- WindowsGraphics.cs
- BaseUriHelper.cs
- XmlNamespaceManager.cs
- DataGridViewRowPostPaintEventArgs.cs
- StreamGeometryContext.cs
- Button.cs
- TextEffectResolver.cs
- SettingsSavedEventArgs.cs
- CustomExpressionEventArgs.cs
- NaturalLanguageHyphenator.cs
- HtmlTextArea.cs
- EventOpcode.cs
- RefreshEventArgs.cs
- MailMessageEventArgs.cs
- PostBackOptions.cs
- CommentAction.cs
- SharedUtils.cs
- OrthographicCamera.cs
- DocumentPageTextView.cs
- ValidationResult.cs
- InvokePatternIdentifiers.cs
- HostingEnvironment.cs
- ExternalException.cs
- StylusPointCollection.cs
- UrlPath.cs
- ProfileSettings.cs
- TcpSocketManager.cs
- Visual3D.cs
- NameValueCollection.cs
- ActivityValidator.cs
- RoutedEventArgs.cs
- DragCompletedEventArgs.cs
- SafeReversePInvokeHandle.cs
- XmlDocumentSerializer.cs
- OptimalBreakSession.cs
- DataGridViewToolTip.cs
- SqlProviderManifest.cs
- ImageSourceConverter.cs
- TypeDependencyAttribute.cs
- CachedPathData.cs
- UITypeEditor.cs
- SHA1Managed.cs
- DynamicMethod.cs
- DesignBinding.cs
- Setter.cs
- NativeCompoundFileAPIs.cs
- ImportContext.cs
- ScopelessEnumAttribute.cs
- XPathItem.cs
- DataGridViewCheckBoxCell.cs
- InternalTypeHelper.cs
- RequestSecurityTokenForRemoteTokenFactory.cs
- TypedTableBaseExtensions.cs
- RTLAwareMessageBox.cs
- DSASignatureDeformatter.cs
- XmlSchemaObject.cs