开发者

How do I select a template for a GroupBox based on the value of an object

开发者 https://www.devze.com 2023-01-28 00:11 出处:网络
I want the contents of a group box to be selected by value, so how I do write the XAML to do this? <GroupBox Header=\"Specific details\"

I want the contents of a group box to be selected by value, so how I do write the XAML to do this?

<GroupBox Header="Specific details"
    ContentTemplateSelector={StaticResource 开发者_开发问答someSelector}>

...

</GroupBox>

The template selector will let me select which template to use, but what I can't figure is the syntax to associate this group box with a value in a variable somehow?


The answer is to use a TabControl with no headers and let the SelectedIndex be set by the value.

0

精彩评论

暂无评论...
验证码 换一张
取 消