【问题标题】:WPF Extended Toolkit BusyIndicator Text is cutoffWPF 扩展工具包 BusyIndi​​cator 文本被截断
【发布时间】:2016-07-13 14:20:55
【问题描述】:

当我在任何其他应用程序中使用 WPF 扩展工具包 BusyIndi​​cator 时,我没有任何问题。在我当前的应用程序中使用它,文本被截断。我一直在玩 BusyIndi​​cator 上的属性。这是 xaml:

<xctk:BusyIndicator IsBusy="True" Panel.ZIndex="1000"/>

我想发布一张图片,以便您可以看到它的样子。 “请稍候...”文本太低,并且栏位于其顶部。有谁之前经历过这个吗?我不知道该怎么做。我不知道如何改变盒子内内容的高度,如果这甚至是问题的话。

编辑:

目前显示如下:

但我希望它在不覆盖文本的情况下显示:

设计器显示它我希望它显示的方式,但应用程序在运行时显示它,如图一所示。

【问题讨论】:

  • 你能放一张你想要得到的结果的图片吗?
  • @ganchito55 我用图片编辑了我的帖子
  • “请稍候”是img还是文本块?
  • @ganchito55 他已经发布了他的整个BusyIndicator XAML 标签,Please wait 是默认值。
  • 此问题可能与您的 xaml 中我们看不到的其他内容有关。还是代码&lt;xctk:BusyIndicator IsBusy="True" Panel.ZIndex="1000"/&gt; 自己造成了截止问题?

标签: c# wpf busyindicator wpf-extended-toolkit


【解决方案1】:

我认为您的问题是您更改了默认文本块大小。但您也可以使用 BusyContentTemplate 进行修复 例如,我将文本变大变红:

        <xctk:BusyIndicator IsBusy="True" Panel.ZIndex="1000" >
            <xctk:BusyIndicator.BusyContentTemplate>
                <DataTemplate>
                    <TextBlock Foreground="Red" FontSize="15">Please Wait</TextBlock>
                </DataTemplate>
            </xctk:BusyIndicator.BusyContentTemplate>
         </xctk:BusyIndicator>

您还可以根据需要更改文本块。

希望对你有帮助。

【讨论】:

    【解决方案2】:

    我发现了这个问题。 WPF 扩展工具包的 BusyIndi​​cator 中的基础数据类型是网格。网格的属性之一被设置在一个我不知道的全局样式文件中......

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-16
      • 1970-01-01
      • 2016-03-22
      • 2011-09-17
      • 1970-01-01
      • 2021-10-14
      • 2019-08-13
      • 2018-01-28
      相关资源
      最近更新 更多