示例#1
0
        public void TestEnableBehaviorsInDesignTimeForEventTriggers()
        {
            ViewModelDesignHelper.IsInDesignModeOverride = true;
            var trigger = new FakeTrigger();
            var border  = new Border();
            var button  = new Button();

            border.Child = button;
            InteractionHelper.SetEnableBehaviorsInDesignTime(border, true);
            CheckAttach(trigger, button);
        }
示例#2
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);
        }