I just read about overlaying glyphs. I am trying it out. This is the simplified xaml portion to compose the TreeViewItem.Header
<TreeViewItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Name="icon" FontFamily="Segoe MDL2 Assets"
Text="" Foreground="Blue" Background="cyan" />
<TextBlock Name="title"/>
</StackPanel>
</TreeViewItem.Header>
It produces a header containing glyph ED0D like this:
However, I would like to overlay ED0C onto glyph ED0D.
What avenues are available to me to perform such overlay to be used in the TreeViewItem.Header?
CodePudding user response:
Put two TextBlocks on top of each other:
<StackPanel Orientation="Horizontal">
<Grid TextElement.FontFamily="Segoe MDL2 Assets">
<TextBlock Text="" Foreground="Cyan"/>
<TextBlock Text="" Foreground="Blue"/>
</Grid>
<TextBlock x:Name="title"/>
</StackPanel>
Result: