我想使用 Xtended WPF Toolkit
的向导控件构建一个向导。但是,在设计器中我只能看到第一页,无法找到切换到另一页的方法。在 TabControl
等其他控件中,如果我将光标置于 TabItem
中,设计器会切换,但此处不会。
那么,我该如何实现呢?
最佳答案
在“向导”中查看页面只有两个选项:使用CurrentPage
和编辑向导项目的可见性(您可以注释掉那些您完成使用的项目)。
没有其他方法可以在设计时查看不同的页面。要使用CurrentPage
属性,您可以使用它进行设计并在编译前删除。我没有看到另一种简单的方法来做到这一点。
刚刚用必需的属性更新了原始 XCeed 的 Wizard
示例
<xctk:Wizard FinishButtonClosesWindow="True" CurrentPage="{Binding ElementName=Page2}">
<xctk:WizardPage x:Name="IntroPage"
Title="Welcome to my Wizard"
Description="This Wizard will walk you though how to do something." />
<xctk:WizardPage x:Name="Page1" PageType="Interior"
Title="Page 1"
Description="This is the first page in the process."
NextPage="{Binding ElementName=Page2}"
PreviousPage="{Binding ElementName=IntroPage}"/>
<xctk:WizardPage x:Name="Page2" PageType="Interior"
Title="Page 2"
Description="This is the second page in the process"/>
<xctk:WizardPage x:Name="LastPage" PageType="Interior"
Title="Last Page"
Description="This is the last page in the process"
CanFinish="True"/>
</xctk:Wizard>
关于c# - 如何在设计器中显示扩展 WPF 工具包向导的第一个向导页面以外的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41547644/