private void CreatePopup(VisualStateTransitionSceneNode transitionNode)
        {
            VisualStateManagerSceneNode.EnsureExtendedAssemblyReferences((ITypeResolver)transitionNode.ProjectContext, transitionNode.DesignerContext.AssemblyService, transitionNode.DesignerContext.ViewUpdateManager);
            IType type = transitionNode.ProjectContext.ResolveType(ProjectNeutralTypes.TransitionEffect);

            if (transitionNode.ProjectContext.PlatformMetadata.IsNullType((ITypeId)type))
            {
                return;
            }
            transitionNode.ViewModel.TransitionSelectionSet.SetSelection(transitionNode);
            SceneNodeProperty transitionEffectProperty = new VisualStateTransitionEditor(transitionNode).VisualTransitionObjectSet.CreateSceneNodeProperty(new PropertyReference((ReferenceStep)transitionNode.ProjectContext.ResolveProperty(VisualStateManagerSceneNode.TransitionEffectProperty)), TypeUtilities.GetAttributes(type.RuntimeType));

            this.popup = new TransitionEffectPickerPopup(transitionEffectProperty, transitionNode.ViewModel.DefaultView);
            transitionNode.ViewModel.Closing += new EventHandler(this.ViewModel_Closing);
            this.popup.SynchronousClosed     += (EventHandler)((sender, e) =>
            {
                if (transitionNode.IsAttached && transitionNode.ViewModel != null)
                {
                    transitionNode.ViewModel.TransitionSelectionSet.Clear();
                }
                if (transitionEffectProperty != null)
                {
                    transitionEffectProperty.OnRemoveFromCategory();
                    transitionEffectProperty = (SceneNodeProperty)null;
                }
                transitionNode.ViewModel.Closing -= new EventHandler(this.ViewModel_Closing);
                this.popup = (TransitionEffectPickerPopup)null;
            });
            this.popup.Placement       = PlacementMode.Bottom;
            this.popup.PlacementTarget = (UIElement)this;
            this.popup.IsOpen          = true;
        }
Esempio n. 2
0
 public TransitionModel(VisualStateTransitionSceneNode sceneNode, StateGroupModel groupModel)
 {
     this.sceneNode  = sceneNode;
     this.groupModel = groupModel;
     this.UpdateDuration();
 }
Esempio n. 3
0
 public VisualStateTransitionEditor(VisualStateTransitionSceneNode sceneNode)
 {
     this.sceneNode     = sceneNode;
     this.helper        = new PropertyEditingHelper(this.sceneNode.DesignerContext.ActiveDocument, (UIElement)null);
     this.transitionSet = new VisualTransitionObjectSet(sceneNode, this);
 }
 public VisualTransitionObjectSet(VisualStateTransitionSceneNode sceneNode, VisualStateTransitionEditor transactionContext)
     : base(sceneNode.DesignerContext, (IPropertyInspector)transactionContext)
 {
     this.sceneNode = sceneNode;
 }