简体   繁体   English

WPF使用扩展工具包向导-如何隐藏页脚区域?

[英]WPF Using Extended Toolkit Wizard - How to hide footer area?

I am using Extended Toolkit to create a wizard in WPF. 我正在使用扩展工具包在WPF中创建向导。

I choose PageType = WizardPageType.Blank . 我选择PageType = WizardPageType.Blank

I want to see an empty page, but I still see the footer area (I hide all buttons). 我想看到一个空白页面,但仍然看到页脚区域(我隐藏了所有按钮)。

How can I hide this footer area? 如何隐藏该页脚区域?

There is no property to hide the footer area. 没有可隐藏页脚区域的属性。

However, you can override the control template of the wizard. 但是,您可以覆盖向导的控制模板。 FYI, the default style is available on GitHub . 仅供参考,默认样式在GitHub上可用

Assuming the namespace xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" , your "very basic" control template could look like this: 假设名称空间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>

Place this into Window.Resources or Application.Resources or wherever you like. 将其放入Window.ResourcesApplication.Resources或任何您喜欢的地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM