コード例 #1
0
        public INodeViewConfig <TEntity> AddNavigationButton <TNavigationHandler>(string?label = null, string?icon = null)
            where TNavigationHandler : INavigationHandler
        {
            var button = new NavigationButtonConfig(typeof(TNavigationHandler))
            {
                Icon  = icon,
                Label = label
            };

            Buttons.Add(button);

            return(this);
        }
コード例 #2
0
        public INodeViewConfig <TEntity> AddNavigationButton <TNavigationHandler>(string?label = null, string?icon = null, Func <IEntity, EntityState, bool>?isVisible = null)
            where TNavigationHandler : INavigationHandler
        {
            var button = new NavigationButtonConfig(typeof(TNavigationHandler))
            {
                Icon  = icon,
                Label = label
            };

            button.VisibleWhen(isVisible);

            Buttons.Add(button);

            return(this);
        }