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); }
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); }
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; }