【问题标题】:WPF Using Extended Toolkit Wizard - How to hide footer area?WPF 使用扩展工具包向导 - 如何隐藏页脚区域?
【发布时间】:2019-12-30 09:19:03
【问题描述】:

我正在使用扩展工具包在 WPF 中创建向导。

我选择PageType = WizardPageType.Blank

我想看到一个空白页面,但我仍然看到页脚区域(我隐藏了所有按钮)。

如何隐藏此页脚区域?

【问题讨论】:

    标签: wpf footer wizard wpf-extended-toolkit


    【解决方案1】:

    没有隐藏页脚区域的属性。

    但是,您可以覆盖向导的控制模板。仅供参考,默认样式可用on GitHub

    假设命名空间xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit",您的“非常基本”的控件模板可能如下所示:

    <Style TargetType="{x:Type xctk:Wizard}">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type xctk:Wizard}">
            <Border Background="{TemplateBinding Background}"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}"
                  Padding="{TemplateBinding Padding}">
              <Grid>
                <ContentPresenter Content="{Binding CurrentPage, RelativeSource={RelativeSource TemplatedParent}}" />
              </Grid>
            </Border>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    

    将其放入Window.ResourcesApplication.Resources 或任何您喜欢的位置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多