Exemplo n.º 1
0
        public void AttachDetachTest()
        {
            StubTrigger stubTrigger = new StubTrigger();

            BehaviorTestUtilities.TestIAttachedObject <Button>((IAttachedObject)stubTrigger);

            StubEventTriggerBase stubEventTrigger = new StubEventTriggerBase();

            BehaviorTestUtilities.TestIAttachedObject <StubBehavior>((IAttachedObject)stubEventTrigger);
        }
Exemplo n.º 2
0
        public void AttachDetachTest()
        {
            StubAction stubAction = new StubAction();

            BehaviorTestUtilities.TestIAttachedObject <Button>((IAttachedObject)stubAction);

            StubTargetedTriggerAction stubTargetedTriggerAction = new StubTargetedTriggerAction();

            BehaviorTestUtilities.TestIAttachedObject <Button>((IAttachedObject)stubTargetedTriggerAction);
        }
Exemplo n.º 3
0
        public void AttachDetachTest()
        {
            StubBehavior stubBehavior = new StubBehavior();

            BehaviorTestUtilities.TestIAttachedObject <Button>((IAttachedObject)stubBehavior);

            Rectangle          rectangle          = new Rectangle();
            StubBehavior       behavior           = new StubBehavior();
            BehaviorCollection behaviorCollection = Interaction.GetBehaviors(rectangle);

            behaviorCollection.Add(behavior);
            behaviorCollection.Detach();
            BehaviorTestUtilities.TestIAttachedObject <Button>((IAttachedObject)behaviorCollection);
        }
Exemplo n.º 4
0
        public void ConstrainedTriggerTest()
        {
            StubButtonTrigger stubButtonTrigger = new StubButtonTrigger();

            BehaviorTestUtilities.TestConstraintOnAssociatedObject <Button>(stubButtonTrigger);
        }
Exemplo n.º 5
0
 public void ConstrainedActionTest()
 {
     BehaviorTestUtilities.TestConstraintOnAssociatedObject <Button>(new StubButtonTriggerAction());
 }