[UWP] [XAML]错误报告:ComboBox和ComboBoxArrowThemeFontSize [英] [UWP][XAML] Bug Report: ComboBox and ComboBoxArrowThemeFontSize

查看:112
本文介绍了[UWP] [XAML]错误报告:ComboBox和ComboBoxArrowThemeFontSize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考:  https://msdn.microsoft.com/en-us/library/windows/apps/mt299116.aspx


ComboBoxArrowThemeFontSize 被定义为值 21 ,我认为这是12的拼写错误。(我已经确认使用此值解析为值21,因此文档是正确的。)


ComboBox模板在任何地方使用此值,而不是"DropDownGlyph"。设置为
FontSize =" 12"


tl; dr:

< x:Double x:Key =" ComboBoxArrowThemeFontSize"> 21< / x:Double> 

<! - ... - >

< FontIcon x:Name =" DropDownGlyph"
Grid.Row =" 1"
Grid.Column =" 1"
IsHitTestVisible =" False"
Margin =" 0,10,10,10"
Foreground =" {ThemeResource SystemControlForegroundBaseMediumHighBrush}"
FontFamily =" {ThemeResource SymbolThemeFontFamily}"
FontSize =" 12"
Glyph ="&#xE0E5;"
Horizo​​ntalAlignment =" Right"
VerticalAlignment =" Center"
AutomationProperties.AccessibilityView =" Raw" />

我认为这应该是:

< x:Double x:Key =" ComboBoxArrowThemeFontSize"> 12< / X:双> 

<! - ... - >

< FontIcon x:Name =" DropDownGlyph"
Grid.Row =" 1"
Grid.Column =" 1"
IsHitTestVisible =" False"
Margin =" 0,10,10,10"
Foreground =" {ThemeResource SystemControlForegroundBaseMediumHighBrush}"
FontFamily =" {ThemeResource SymbolThemeFontFamily}"
FontSize =" {ThemeResource ComboBoxArrowThemeFontSize}"
Glyph ="&#xE0E5;"
Horizo​​ntalAlignment =" Right"
VerticalAlignment =" Center"
AutomationProperties.AccessibilityView =" Raw" />

解决方案

嗨  ; Zac Stringham,


您是否在设备操作系统构建10586上测试此问题并添加类似< Page.Resource />的内容在页面中如下代码?

< Page.Resources> 
< x:Double x:Key =" ComboBoxArrowThemeFontSize"> 12< / x:Double>
< /Page.Resources>

然后设置  FontSize =" {ThemeResource ComboBoxArrowThemeFontSize}"在FontIcon(第一个)和 比较大小与另一个FontIcon(秒)巫婆设置  FontSize =" 12"?


如果第一个FontIcon将引用  ComboBoxArrowThemeFontSize
此页面中的资源12而不是原始版本21.因此它与12具有相同的效果。


我在创建者更新中测试过OS构建15063,并且没有在页面中添加资源并设置FontSize ="{ThemeResource ComboBoxArrowThemeFontSize}",FontIcon是21,但FontIcon与FontSize ="12"相同。是12.它运作良好。
你可以试试看15063系统吧。


祝你好运,


Breeze


Reference: https://msdn.microsoft.com/en-us/library/windows/apps/mt299116.aspx

The ComboBoxArrowThemeFontSize is defined as the value 21, and I believe this to be a typo of 12. (I have verified that using this value resolves to the value 21, so the documentation is correct.)

The ComboBox template does not use this value anywhere, instead the "DropDownGlyph" has the setting FontSize="12"

tl;dr:

<x:Double x:Key="ComboBoxArrowThemeFontSize">21</x:Double>

<!-- ... -->

<FontIcon x:Name="DropDownGlyph"
            Grid.Row="1"
            Grid.Column="1"
            IsHitTestVisible="False"
            Margin="0,10,10,10"
            Foreground="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
            FontFamily="{ThemeResource SymbolThemeFontFamily}"
            FontSize="12"
            Glyph="&#xE0E5;"
            HorizontalAlignment="Right"
            VerticalAlignment="Center"
            AutomationProperties.AccessibilityView="Raw" />

I believe this should be:

<x:Double x:Key="ComboBoxArrowThemeFontSize">12</x:Double>

<!-- ... -->

<FontIcon x:Name="DropDownGlyph"
            Grid.Row="1"
            Grid.Column="1"
            IsHitTestVisible="False"
            Margin="0,10,10,10"
            Foreground="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
            FontFamily="{ThemeResource SymbolThemeFontFamily}"
            FontSize="{ThemeResource ComboBoxArrowThemeFontSize}"
            Glyph="&#xE0E5;"
            HorizontalAlignment="Right"
            VerticalAlignment="Center"
            AutomationProperties.AccessibilityView="Raw" />

解决方案

Hi Zac Stringham,

Do you test this issue on the device OS build 10586 and add something like <Page.Resource/> in the page as the following code?

   <Page.Resources>
        <x:Double x:Key="ComboBoxArrowThemeFontSize">12</x:Double>
    </Page.Resources>

Then you set the FontSize="{ThemeResource ComboBoxArrowThemeFontSize}" in a FontIcon(First) and compare the size with the another FontIcon(Second) witch set the FontSize="12"?

If that the First FontIcon will refer the ComboBoxArrowThemeFontSize resource in this page 12 not the original 21. So it has the same effect with 12.

I have tested on the Creators Update with OS build 15063, and didn't add the resource in the page and set FontSize="{ThemeResource ComboBoxArrowThemeFontSize}", the FontIcon is 21, but the FontIcon with FontSize="12" is 12. It works well. You can have a try with the 15063 System to see it.

Best regards,

Breeze


这篇关于[UWP] [XAML]错误报告:ComboBox和ComboBoxArrowThemeFontSize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆