ui/wpf/UIcore/Window.cs

changeset 137
c9b8b9e0cfe8
parent 135
b9dc9cdfa23a
child 138
d781436e2490
equal deleted inserted replaced
136:1df2fb3d079c 137:c9b8b9e0cfe8
40 this.AddChild(windowGrid); 40 this.AddChild(windowGrid);
41 int rowIndex = 0; 41 int rowIndex = 0;
42 42
43 // menu 43 // menu
44 Application app = Application.GetInstance(); 44 Application app = Application.GetInstance();
45 System.Windows.Controls.Menu menu = null;
45 if (!app.Menu.IsEmpty()) 46 if (!app.Menu.IsEmpty())
46 { 47 {
47 System.Windows.Controls.Menu menu = app.Menu.CreateMenu(uiobj); 48 menu = app.Menu.CreateMenu(uiobj);
48 49
49 RowDefinition menuRow = new RowDefinition(); 50 RowDefinition menuRow = new RowDefinition();
50 menuRow.Height = GridLength.Auto; 51 menuRow.Height = GridLength.Auto;
51 windowGrid.RowDefinitions.Add(menuRow); 52 windowGrid.RowDefinitions.Add(menuRow);
52 53
66 67
67 Grid.SetRow(tray, rowIndex); 68 Grid.SetRow(tray, rowIndex);
68 Grid.SetColumn(tray, 0); 69 Grid.SetColumn(tray, 0);
69 windowGrid.Children.Add(tray); 70 windowGrid.Children.Add(tray);
70 rowIndex++; 71 rowIndex++;
72
73 if(menu != null)
74 {
75 menu.Background = tray.Background;
76 }
71 } 77 }
72 78
73 // content 79 // content
74 RowDefinition contentRow = new RowDefinition(); 80 RowDefinition contentRow = new RowDefinition();
75 contentRow.Height = new GridLength(1, GridUnitType.Star); 81 contentRow.Height = new GridLength(1, GridUnitType.Star);

mercurial