6

We are developing a custom header bar and we need to use the close/minimize/reduce button from the Windows 10 theme even if we are in windows 7.

Our approach was to use the font family from Windows 10. Is there a way to get it?

Jonathan
  • 93
  • 2
  • 9

1 Answers1

11

You should be able to download the Segoe MDL2 Assets font family from here or just copy the .ttf file over from a Windows 10 instance: https://www.azfonts.net/families/segoe-mdl2-assets.html

Once you have done this, you should add the .ttf file to your project as a resource. You can then use the symbols like this:

<!-- Minimize -->
<TextBlock Text="Value="&#xE949;" FontFamily="pack://application:,,,/#Segoe MDL2 Assets" FontSize="10" />

<!-- Maximize -->
<TextBlock Text="Value="&#xE739;" FontFamily="pack://application:,,,/#Segoe MDL2 Assets" FontSize="10" />

<!-- Restore -->
<TextBlock Text="Value="&#xE923;" FontFamily="pack://application:,,,/#Segoe MDL2 Assets" FontSize="10" />

<!-- Close -->
<TextBlock Text="Value="&#xE106;" FontFamily="pack://application:,,,/#Segoe MDL2 Assets" FontSize="10" />
mm8
  • 163,881
  • 10
  • 57
  • 88
  • 2
    You can simply use FontFamily="Segoe MDL2 Assets" – devpelux Aug 01 '18 at 18:59
  • Very skinny chances FontFamily="Segoe MDL2 Assets" will resolve on non-Windows 10 PC's. If this concerns you I suggest to embed font in assembly as per accepted answer. – Pawel Aug 18 '20 at 19:56
  • Has anyone actually tried using this code and can confirm that it works? Because that syntax is wrong... – LightBulb Aug 12 '21 at 10:31