Example #1
0
        public void TestBehaviorNotAllowAttachInDesignMode_AttachInRunTime_InteractionHelperOnBehavior()
        {
            var b = new TestBehaviorNotAllowAttachInDesignMode();

            InteractionHelper.SetBehaviorInDesignMode(b, InteractionBehaviorInDesignMode.AsWellAsNotInDesignMode);
            CheckAttach(b);
        }
Example #2
0
        public void TestBehaviorNotAllowAttachInDesignMode_AttachInDesignTime_InteractionHelperOnBehavior()
        {
            ViewModelDesignHelper.IsInDesignModeOverride = true;
            var b = new TestBehaviorNotAllowAttachInDesignMode();

            InteractionHelper.SetBehaviorInDesignMode(b, InteractionBehaviorInDesignMode.AsWellAsNotInDesignMode);
            CheckNotAttach(b);
        }
Example #3
0
        public void TestEnableBehaviorsInDesignTime()
        {
            ViewModelDesignHelper.IsInDesignModeOverride = true;
            var b      = new TestBehaviorNotAllowAttachInDesignMode();
            var border = new Border();

            InteractionHelper.SetEnableBehaviorsInDesignTime(border, true);
            var button = new Button();

            border.Child = button;
            CheckAttach(b, button);
        }