void WidgetManagerWidgetLoaded(WidgetProxy widget) { var control = new WidgetControl(widget) { Order = WidgetHost.Children.Count }; control.Load(); PlaceWidget(control); //WidgetHost.HorizontalAlignment = HorizontalAlignment.Right; WidgetHost.Children.Add(control); }
private void WindowLoaded(object sender, RoutedEventArgs e) { App.WindowManager.Initialize(); //MarkupGrid(); var wid = new WidgetProxy { WidgetComponent = new WidgetDerived() }; WidgetManagerWidgetLoaded(wid); var widClock = new WidgetProxy { WidgetComponent = new WidgetClock() }; WidgetManagerWidgetLoaded(widClock); }
public WidgetControl(WidgetProxy widgetProxy) { InitializeComponent(); this.WidgetProxy = widgetProxy; }