Пример #1
0
        object?Create(ToolBarItemMD md, IToolBarItemContext ctx, IInputElement?commandTarget)
        {
            if (md is ToolBarButtonMD mdButton)
            {
                return(Create(mdButton, ctx, commandTarget));
            }

            if (md is ToolBarObjectMD mdObj)
            {
                return(Create(mdObj, ctx, commandTarget));
            }

            Debug.Fail("Unknown TB MD");
            return(null);
        }
Пример #2
0
        object Create(ToolBarItemMD md, IToolBarItemContext ctx, IInputElement commandTarget)
        {
            var mdButton = md as ToolBarButtonMD;

            if (mdButton != null)
            {
                return(Create(mdButton, ctx, commandTarget));
            }

            var mdObj = md as ToolBarObjectMD;

            if (mdObj != null)
            {
                return(Create(mdObj, ctx, commandTarget));
            }

            Debug.Fail("Unknown TB MD");
            return(null);
        }
Пример #3
0
        object Create(ToolBarItemMD md, IToolBarItemContext ctx, IInputElement commandTarget)
        {
            var mdButton = md as ToolBarButtonMD;
            if (mdButton != null)
                return Create(mdButton, ctx, commandTarget);

            var mdObj = md as ToolBarObjectMD;
            if (mdObj != null)
                return Create(mdObj, ctx, commandTarget);

            Debug.Fail("Unknown TB MD");
            return null;
        }