Exemplo n.º 1
0
        private bool CheckCategoryUp(IToolboxCategory category)
        {
            var items = _service.GetToolboxItemSource().ToList();

            if (!items.Contains(category))
            {
                return(false);
            }

            var index = items.IndexOf(category);

            if (index <= 0)
            {
                return(false);
            }
            if (items.GetRange(0, index).Any(x => x.IsVisible))
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
 protected override void ClearCurrentLayout()
 {
     _service.GetToolboxItemSource().ForEach(x => x.Items.Clear());
     _service.StoreAndApplyLayout(new List <IToolboxCategory>());
 }