예제 #1
0
		public MenuItemCanvas(List<ItemLayout> item_layout_list = null, MenuItemButtonClickEvent menu_item_button_click_event = null)
		{
			InitializeComponent();

			mMenuItemBUttonClickEvent = menu_item_button_click_event;

			if (item_layout_list != null)
			{
				mItemLayoutList = item_layout_list;
			}
			else
			{
				mItemLayoutList = DBManager.getInstance().getItemLayoutList();
			}

			Background = MetrialColor.getBrush(MetrialColor.Name.Grey, 2);

			foreach(ItemLayout item_layout in mItemLayoutList)
			{
				MenuItemButton item_button = new MenuItemButton(item_layout);
				item_button.Click += mMenuItemBUttonClickEvent;
				canvas.Children.Add(item_button);
			}
		}
예제 #2
0
		public Menu(MenuItem item, MenuItemButton button)
		{
			this.item = item;
			this.button = button;
		}