转换器不总是使用XAML Windows应用商店应用程序

转换器不总是使用XAML Windows应用商店应用程序,xaml,windows-store-apps,converter,Xaml,Windows Store Apps,Converter,我一直在使用转换器根据某些条件动态更改我的应用程序的样式 我发现转换器并不总是工作正常 具体来说,我发现了几个它不起作用的实例: 使用带值的转换器 <Style x:Key="Style_TextBlock_Label_H4" BasedOn="{StaticResource Style_TextBlock_LabelBase}" TargetType="TextBlock"> <Setter Property

我一直在使用转换器根据某些条件动态更改我的应用程序的样式

我发现转换器并不总是工作正常

具体来说,我发现了几个它不起作用的实例:

使用带值的转换器

    <Style x:Key="Style_TextBlock_Label_H4"
           BasedOn="{StaticResource Style_TextBlock_LabelBase}"
           TargetType="TextBlock">
        <Setter Property="FontSize" Value="{Binding Converter={StaticResource MyConverter},
                                            ConverterParameter=LabelH4}" />
        <Setter Property="Foreground" Value="#FFAAAAAA" />
    </Style>

使用具有ContentControl风格的转换器

<ContentControl Style="{Binding Converter={StaticResource LargeSizeConverter}, ConverterParameter=Style_ContentControl_Modifier_Radio_Minimal}">
                    <i:Interaction.Behaviors>
                        <Dovetail_UI_Register_Controls_Behaviors:PointerPressedToToggleBehaviorMinimal />
                    </i:Interaction.Behaviors>
    </ContentControl>

对于这两个实例,到目前为止,它们甚至没有进入转换器本身

如果与文本块样式一起使用,转换器工作正常:

<TextBlock x:Name="TextBlock_ControlPrimaryContent_Popoutright"
                   Style="{Binding Converter={StaticResource LargeSizeConverter},ConverterParameter=Style_Button_ModifierPopoutRight_Minimal}"
                   Text="">

你知道我是否做错了什么/做事情的方式更好吗?或者根本不支持这一点


谢谢大家!

在UWP/Store应用程序中不支持样式设置器中的绑定。

在UWP/Store应用程序中不支持样式设置器中的绑定。

请参阅请参阅