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); |