简体   繁体   English

设置扩展工具包BusyIndi​​cator的样式

[英]Styling the Extended Toolkit BusyIndicator

I'm looking to style the BusyIndicator so it looks something along the lines of this; 我正在寻找BusyIndicator样式,所以它看起来像这样;

在此输入图像描述

At the moment my busy indicator does not take up the whole Window that it is placed in too, which I would like it to do. 目前,我的繁忙指示器并没有占据它所放置的整个Window ,我希望它能做到。 My current BusyIndicator looks like this; 我目前的BusyIndicator看起来像这样;

在此输入图像描述

Has anybody had success with styling the BusyIndicator ? 有没有人成功设计BusyIndicator I've had a look at the example on the Extended Toolkit website however it does not result in what I would like the indicator to look like. 我已经看过Extended Toolkit网站上的示例,但它并没有导致我希望指标看起来像什么。

This is a part of BusyIndicator 's control template: 这是BusyIndicator控件模板的一部分:

<ContentPresenter x:Name="busycontent">
                     <ContentPresenter.Content>
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center">

busycontent element is a rectangular region, which holds "Please wait" (default BusyContent ) and progress bar. busycontent元素是一个矩形区域,它保存“Please wait”(默认BusyContent )和进度条。 As you can see, alignment values for Grid are hard-coded and they make grid to be centered. 如您所见, Grid对齐值是硬编码的,它们使网格居中。

You have two options: 您有两种选择:

  • apply your own control template (you can base it on Xceed's one); 应用您自己的控件模板(您可以将其基于Xceed的模板);
  • make your own BusyIndicator (since it is based on overlays concept, it is not so complex task). 制作自己的BusyIndicator (因为它基于叠加概念,它不是那么复杂的任务)。

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

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