ui/wpf/UIcore/Menu.cs

changeset 137
c9b8b9e0cfe8
parent 82
0cdb8089a29f
equal deleted inserted replaced
136:1df2fb3d079c 137:c9b8b9e0cfe8
3 using System.Linq; 3 using System.Linq;
4 using System.Text; 4 using System.Text;
5 using System.Threading.Tasks; 5 using System.Threading.Tasks;
6 using System.Windows; 6 using System.Windows;
7 using System.Windows.Controls; 7 using System.Windows.Controls;
8 using System.Windows.Media;
8 9
9 namespace UI 10 namespace UI
10 { 11 {
11 public class ApplicationMenu 12 public class ApplicationMenu
12 { 13 {
49 } 50 }
50 51
51 public System.Windows.Controls.Menu CreateMenu(IntPtr uiobj) 52 public System.Windows.Controls.Menu CreateMenu(IntPtr uiobj)
52 { 53 {
53 System.Windows.Controls.Menu menu = new System.Windows.Controls.Menu(); 54 System.Windows.Controls.Menu menu = new System.Windows.Controls.Menu();
55 menu.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255));
54 foreach (Menu m in Menus) 56 foreach (Menu m in Menus)
55 { 57 {
56 System.Windows.Controls.MenuItem i = new System.Windows.Controls.MenuItem(); 58 System.Windows.Controls.MenuItem i = new System.Windows.Controls.MenuItem();
57 i.Header = m.Label; 59 i.Header = m.Label;
58 m.AddItems(i, uiobj); 60 m.AddItems(i, uiobj);

mercurial