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
- ServicesUtilities.cs
- ProtocolViolationException.cs
- ContextMenu.cs
- X509SecurityTokenParameters.cs
- SQLSingle.cs
- MetadataArtifactLoaderCompositeResource.cs
- GeometryGroup.cs
- EndpointDispatcher.cs
- X500Name.cs
- SqlDataSourceFilteringEventArgs.cs
- WebServiceResponseDesigner.cs
- Margins.cs
- ContextConfiguration.cs
- DeferredSelectedIndexReference.cs
- APCustomTypeDescriptor.cs
- OdbcReferenceCollection.cs
- BindingsCollection.cs
- MailAddressParser.cs
- _NestedMultipleAsyncResult.cs
- ArgumentException.cs
- _TransmitFileOverlappedAsyncResult.cs
- Ticks.cs
- PageSetupDialog.cs
- ComAdminWrapper.cs
- UInt16Storage.cs
- MsmqIntegrationInputChannel.cs
- ContainerUIElement3D.cs
- Comparer.cs
- HeaderedContentControl.cs
- odbcmetadatacollectionnames.cs
- XmlDataImplementation.cs
- MenuItemBinding.cs
- ClassHandlersStore.cs
- DesignerCapabilities.cs
- TemplateBindingExpression.cs
- XmlNamespaceMappingCollection.cs
- PersonalizableTypeEntry.cs
- RuleSettings.cs
- FileSystemInfo.cs
- CodeDirectionExpression.cs
- DebugView.cs
- TagPrefixCollection.cs
- BaseTemplateCodeDomTreeGenerator.cs
- RuntimeEnvironment.cs
- Int32Rect.cs
- WebServiceHandler.cs
- MsdtcClusterUtils.cs
- AutoSizeComboBox.cs
- StackBuilderSink.cs
- Point3D.cs
- XmlLanguageConverter.cs
- XamlFrame.cs
- NativeRightsManagementAPIsStructures.cs
- DataError.cs
- Calendar.cs
- OrderingExpression.cs
- ParagraphVisual.cs
- SimpleTypeResolver.cs
- HttpDictionary.cs
- IApplicationTrustManager.cs
- FileDialog_Vista.cs
- ObjectIDGenerator.cs
- InputProcessorProfilesLoader.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ColorMatrix.cs
- SQLCharsStorage.cs
- StatusBar.cs
- SynchronizedRandom.cs
- OuterGlowBitmapEffect.cs
- SiteMapProvider.cs
- ZipQueryOperator.cs
- DefaultMemberAttribute.cs
- OdbcCommand.cs
- MemberHolder.cs
- RectAnimationBase.cs
- ValueTypeFixupInfo.cs
- ReadOnlyCollection.cs
- EventEntry.cs
- CodeMemberProperty.cs
- Vector.cs
- CheckBoxField.cs
- AddInStore.cs
- DesignerAutoFormat.cs
- LogAppendAsyncResult.cs
- CatalogZoneDesigner.cs
- GeneratedContractType.cs
- AstTree.cs
- ChannelSinkStacks.cs
- BoundField.cs
- ObjectItemCollection.cs
- SmiRequestExecutor.cs
- XmlSchemaSubstitutionGroup.cs
- SmtpException.cs
- TableAdapterManagerHelper.cs
- COM2PictureConverter.cs
- OdbcConnectionFactory.cs
- RowType.cs
- DragEventArgs.cs
- VerticalAlignConverter.cs
- WaitHandleCannotBeOpenedException.cs