Example #1
0
        private ControlStateViewer CreateControlStateViewer(Type cType, List <string> states)
        {
            ControlStateViewer ctrlStateViewer = new ControlStateViewer();

            ctrlStateViewer.ControlType = cType;
            ctrlStateViewer.States      = states;

            return(ctrlStateViewer);
        }
Example #2
0
        public RedlineViewer(Type controlType)
        {
            this.InitializeComponent();

            _control         = Activator.CreateInstance(controlType) as Control;
            _control.Loaded += Control_Loaded;

            ControlStateViewer.MakeControlPretty(_control, controlType);

            LayoutRoot.Children.Insert(0, _control);
        }
Example #3
0
        public ColorViewer(Type type)
        {
            this.InitializeComponent();

            Control control = Activator.CreateInstance(type) as Control;

            control.HorizontalAlignment = HorizontalAlignment.Left;
            control.Loaded += Control_Loaded;

            ControlStateViewer.MakeControlPretty(control, type);

            LayoutRoot.Children.Add(control);
        }