private ControlStateViewer CreateControlStateViewer(Type cType, List <string> states) { ControlStateViewer ctrlStateViewer = new ControlStateViewer(); ctrlStateViewer.ControlType = cType; ctrlStateViewer.States = states; return(ctrlStateViewer); }
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); }
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); }