1
votes

How can I set the ChildWindow Title content from a style?

Setting the content to text is straightforward:

Setter Property="Title" Value="My Title Text"

How can I put a StackPanel or Image in the Title from the Setter? I know I could extract the entire style for the control and modify the Chrome but I would like to avoid having all that XAML to wade through just to change a small part.

1

1 Answers

1
votes
<basics:ChildWindow.Title>
<StackPanel>
    <TextBlock Text="Moo Title"/>
    <Rectangle Fill="DarkCyan" Height="25" Width="25"/>
</StackPanel>
</basics:ChildWindow.Title>

Why do you want to use a setter in the first place?