Using a TemplateBinding in ControlTemplate.Triggers

前端 未结 2 660
我寻月下人不归
我寻月下人不归 2021-02-07 03:16

Why does the following piece of XAML give me a XamlParseException with the (meaningless) message \"Expression type is not a valid Style value.\" at runtime?

<         


        
2条回答
  •  滥情空心
    2021-02-07 03:40

    Triggers work best when defined in stand-alone styles, not in-place content. Try defining your trigger in a style resource, then reference the style resource from your template.

提交回复
热议问题