|
@@ -6,6 +6,7 @@ using System.Windows.Data;
|
|
|
using System.Windows.Media;
|
|
|
using InABox.Clients;
|
|
|
using InABox.Core;
|
|
|
+using InABox.WPF;
|
|
|
|
|
|
namespace InABox.DynamicGrid
|
|
|
{
|
|
@@ -106,6 +107,7 @@ namespace InABox.DynamicGrid
|
|
|
Grid = new Grid();
|
|
|
Grid.VerticalAlignment = VerticalAlignment.Stretch;
|
|
|
Grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
|
|
|
+ Grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
|
|
|
Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
|
|
|
Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) });
|
|
|
|
|
@@ -119,7 +121,9 @@ namespace InABox.DynamicGrid
|
|
|
//Background = new SolidColorBrush(Colors.Yellow)
|
|
|
};
|
|
|
Scroll.SetValue(Grid.RowProperty, 0);
|
|
|
+ Scroll.SetValue(Grid.RowSpanProperty, 2);
|
|
|
Scroll.SetValue(Grid.ColumnProperty, 0);
|
|
|
+ Scroll.SetValue(Grid.ColumnSpanProperty, 2);
|
|
|
|
|
|
Grid.Children.Add(Scroll);
|
|
|
|
|
@@ -156,21 +160,25 @@ namespace InABox.DynamicGrid
|
|
|
};
|
|
|
|
|
|
Scroll.Child = History;
|
|
|
-
|
|
|
+
|
|
|
Button = new Button
|
|
|
{
|
|
|
VerticalAlignment = VerticalAlignment.Stretch,
|
|
|
VerticalContentAlignment = VerticalAlignment.Center,
|
|
|
HorizontalAlignment = HorizontalAlignment.Stretch,
|
|
|
HorizontalContentAlignment = HorizontalAlignment.Center,
|
|
|
- Content = "Add",
|
|
|
- Width = 50
|
|
|
+ BorderThickness = new Thickness(0F),
|
|
|
+ Background = Brushes.Transparent,
|
|
|
+ Content = new Image() { Source = Wpf.Resources.add.AsBitmapImage() },
|
|
|
+ Width = 48,
|
|
|
+ Height=48,
|
|
|
+ Margin=new Thickness(0,0,5,5)
|
|
|
};
|
|
|
- Button.SetValue(Grid.RowProperty, 0);
|
|
|
- Button.SetValue(Grid.ColumnProperty, 1);
|
|
|
Button.Click += Button_Click;
|
|
|
- Button.Margin = new Thickness(5, 0, 0, 0);
|
|
|
+ Button.SetValue(Grid.RowProperty, 1);
|
|
|
+ Button.SetValue(Grid.ColumnProperty, 1);
|
|
|
Grid.Children.Add(Button);
|
|
|
+
|
|
|
return Grid;
|
|
|
}
|
|
|
|