Example #1
0
        public IStatusBarTextItem GetOrCreateStatusBarTextItem(string guid, GridChildLength gridChildLength, int sort)
        {
            if (!(Children.FirstOrDefault(p => p.GUID == guid) is IStatusBarTextItem item))
            {
                item = CreateStatusBarTextItem(guid);
                StatusBarService.Current.AddStatusBarItem(item, gridChildLength, sort);
                item.Margin = new Thickness(12, 0, 12, 0);
            }

            return(item);
        }
Example #2
0
        public void AddStatusBarItem(IStatusBarObjectItem item, GridChildLength gridChildLength, int index = -1)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            _items.Add(item);
            try {
                _stackGrid.AddChild(item, gridChildLength, index);
            }
            catch (Exception ex) {
                LoggerService.WriteCallerLine(ex.Message);
            }
        }
Example #3
0
        public void AddChild(TStackItem child, GridChildLength gridChildLength, int index = -1)
        {
            if (index < 0)
            {
                index = 0;
            }

            _children.Add(new StackItemCell {
                StackItem       = child,
                GridChildLength = gridChildLength,
                Order           = index
            });

            UpdateGrid();
        }
Example #4
0
 public static IStatusBarTextItem GetOrCreateStatusBarTextItem(string guid, GridChildLength gridChildLength, int sort) =>
 Current.GetOrCreateStatusBarTextItem(guid, gridChildLength, sort);