internal MenuItemsSourceGenerator(IMenu menu, Context context, MenuItemTemplate itemTemplate)
 {
     Should.NotBeNull(menu, nameof(menu));
     Should.NotBeNull(itemTemplate, nameof(itemTemplate));
     _menu = menu;
     _context = context;
     _itemTemplate = itemTemplate;
     TryListenActivity(context);
 }
예제 #2
0
        internal static void ClearInternal(IMenu menu)
        {
            if (menu == null)
            {
                return;
            }
            int size = menu.Size();

            for (int i = 0; i < size; i++)
            {
                MenuItemTemplate.ClearInternal(menu.GetItem(i));
            }
            menu.Clear();
            menu.ClearBindings(true, true);
        }