c# - 如何在设计器中显示扩展 WPF 工具包向导的第一个向导页面以外的内容?

标签 c# wpf wpf-extended-toolkit

我想使用 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/

相关文章:

c# - 在禁用的 WPF StackPanel 中处理单击事件或 MouseDown

c# - 使用 MahApps.Metro 的 WPF CheckComboBox 样式

javascript - 客户端验证无法在输入标记中添加 "onclick"命令

wpf - 通过 DataBinding 在 UserControl 中设置自定义属性

c# - SignalR:无法使用任何可用传输连接到服务器

c# - WPF PropertyGrid 支持多选

c# - 将数据与线程 : How do you do that? 相关联

javascript - 如何使用 ASP.NET Core 设置现代前端开发工作流程?

c# - 带有子检查器的 Unity 自定义检查器