WPF 扩展工具包 BusyIndicator 文本被截断
WPF Extended Toolkit BusyIndicator Text is cutoff
当我在任何其他应用程序中使用 WPF 扩展工具包 BusyIndicator 时,我没有遇到任何问题。在我当前的应用程序中使用它,文本被截断了。我一直在研究 BusyIndicator 上的属性。这是 xaml:
<xctk:BusyIndicator IsBusy="True" Panel.ZIndex="1000"/>
我想 post 一张照片,这样你就可以看到它的样子。 “请稍候...”文本太低,栏位于其上方。有谁之前经历过这个吗?我不知道该怎么做。我不知道如何更改框内内容的高度,如果那是个问题的话。
编辑:
目前显示如下:
但我希望它在不覆盖文本的情况下显示:
设计者按我希望的方式显示,但应用程序 运行 显示如图一所示。
我发现了这个问题。 WPF 扩展工具包的 BusyIndicator 中的基础数据类型是网格。网格的其中一个属性被设置在我不知道的全局样式文件中...
我认为您的问题是您更改了默认的文本块大小。但您也可以使用 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>
您还可以根据需要更改文本块。
希望对您有所帮助
当我在任何其他应用程序中使用 WPF 扩展工具包 BusyIndicator 时,我没有遇到任何问题。在我当前的应用程序中使用它,文本被截断了。我一直在研究 BusyIndicator 上的属性。这是 xaml:
<xctk:BusyIndicator IsBusy="True" Panel.ZIndex="1000"/>
我想 post 一张照片,这样你就可以看到它的样子。 “请稍候...”文本太低,栏位于其上方。有谁之前经历过这个吗?我不知道该怎么做。我不知道如何更改框内内容的高度,如果那是个问题的话。
编辑:
目前显示如下:
但我希望它在不覆盖文本的情况下显示:
设计者按我希望的方式显示,但应用程序 运行 显示如图一所示。
我发现了这个问题。 WPF 扩展工具包的 BusyIndicator 中的基础数据类型是网格。网格的其中一个属性被设置在我不知道的全局样式文件中...
我认为您的问题是您更改了默认的文本块大小。但您也可以使用 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>
您还可以根据需要更改文本块。
希望对您有所帮助