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);
 }
 public void PlaceWidget(WidgetControl widget)
 {
     var colSpan = Grid.GetColumnSpan(widget);
     AppCell cell = App.WindowManager.Matrix.GetFreeCell(colSpan);
     Grid.SetColumn(widget, (int)cell.Column);
     Grid.SetRow(widget, (int)cell.Row);
     widget.HorizontalAlignment = HorizontalAlignment.Right;
     App.WindowManager.Matrix.ReserveSpace(cell.Column, cell.Row, colSpan);
     widget.Width = colSpan * Envi.MinTileWidth - Envi.TileSpacing * 2;
     widget.Height = Envi.MinTileHeight - Envi.TileSpacing * 2;
 }