Пример #1
0
        /// <summary>
        /// Sets the active tab by the name.
        /// </summary>
        /// <param name="tabName"></param>
        public void SelectTab(string tabName)
        {
            if (lastSelectedTab != tabName)
            {
                lastSelectedTab = tabName;

                foreach (var child in childTabs)
                {
                    child.IsActive = child.Name == tabName;
                }

                // raise the tabchanged notification
                SelectedTabChanged?.Invoke(tabName);

                // although nothing is actually changed we need to call this anyways or otherwise the rendering will not be called
                ClassMapper.Dirty();

                StateHasChanged();
            }
        }
Пример #2
0
        public IFluentSpacingOnBreakpointWithSideAndSize WithSize(SpacingSize spacingSize)
        {
            var spacingDefinition = new SpacingDefinition {
                Breakpoint = Breakpoint.None, Side = Side.All
            };

            if (!rules.ContainsKey(spacingSize))
            {
                rules.Add(spacingSize, new List <SpacingDefinition>()
                {
                    spacingDefinition
                });
            }
            else
            {
                rules[spacingSize].Add(spacingDefinition);
            }

            currentSpacing = spacingDefinition;
            ClassMapper.Dirty();
            return(this);
        }
Пример #3
0
        private IFluentColumnOnBreakpointWithOffsetAndSize WithColumnSize(ColumnWidth columnSize)
        {
            var columnDefinition = new ColumnDefinition {
                Breakpoint = Breakpoint.None
            };

            if (!rules.ContainsKey(columnSize))
            {
                rules.Add(columnSize, new List <ColumnDefinition> {
                    columnDefinition
                });
            }
            else
            {
                rules[columnSize].Add(columnDefinition);
            }

            currentColumn = columnDefinition;
            ClassMapper.Dirty();

            return(this);
        }
Пример #4
0
        /// <summary>
        /// Registers a child button reference.
        /// </summary>
        /// <param name="button">Button to register.</param>
        internal void Register(BaseButton button)
        {
            if (button == null)
            {
                return;
            }

            if (registeredButtons == null)
            {
                registeredButtons = new List <BaseButton>();
            }

            if (!registeredButtons.Contains(button))
            {
                registeredButtons.Add(button);

                ClassMapper.Dirty();

                if (registeredButtons?.Count >= 1)   // must find a better way to refresh dropdown
                {
                    StateHasChanged();
                }
            }
        }
 private void OnValidated(ValidatedEventArgs e)
 {
     ClassMapper.Dirty();
 }
Пример #6
0
        internal void MenuChanged()
        {
            ClassMapper.Dirty();

            StateHasChanged();
        }