Skip to content

Simultaneous use of ContentTemplate and Content results in an error #3197

Closed Answered by nicolaihenriksen
Frillaut asked this question in Q&A
Discussion options

You must be logged in to vote

@Frillaut I see. For such a scenario, I think I would create an attached property to hold the PackIconKind. You can then set that attached property value directly in the StyleNavigationComboBoxFilter1/StyleNavigationComboBoxFilter2 styles in a manner like this:

<Style x:Key="StyleNavigationComboBoxFilter1" TargetType="{x:Type md:ColorZone}" BasedOn="{StaticResource StyleNavigationComboBoxColorZone}">
    <Setter Property="ContentTemplate" Value="{StaticResource ContentTemplateNavigationComboBox}"/>
    <Setter Property="custom:MyCustomProperties.CustomPackIconKind" Value="Filter2" />
</Style>

And then in your ContentTemplateNavigationComboBox DataTemplate you could use that instead of the C…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Frillaut
Comment options

@Frillaut
Comment options

@nicolaihenriksen
Comment options

Answer selected by Frillaut
@Frillaut
Comment options

@nicolaihenriksen
Comment options

@Frillaut
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants