1

I have a WPF window which is without the window chrome, so I have implemented custom window controls, like here (I'm going to style them later):

The XAML for this is:

 <StackPanel Orientation="Horizontal" Grid.Column="2" FlowDirection="RightToLeft"> <Button FontFamily="Marlett" FontSize="16" VerticalAlignment="Top" Foreground="White" Background="Black" Width="40">r</Button> <Button FontFamily="Marlett" FontSize="16" VerticalAlignment="Top" Foreground="White" Background="Black" Width="30">1</Button> <Button FontFamily="Marlett" FontSize="16" VerticalAlignment="Top" Foreground="White" Background="Black" Width="30">0</Button> </StackPanel> 

However, I want the icons that are used in the native Windows chrome. Here's an example in Spotify:

As you can see, they look a lot like the Windows buttons, and they fit right in with the background gradient.

Is there a way this can be implemented in WPF, or is there a place I can obtain the Windows window options images/glyphs?

3 Answers 3

1

You can find the XAML for those button icons by looking into the XAML file for the default Aero WPF theme. You can download the XAML for all of the themes... there is a nice list of them found in this post.

Look in the ControlTemplate for the x:Type Window to find that XAML.

Sign up to request clarification or add additional context in comments.

Comments

0

You can get user's color preferences with SystemColors.

Comments

0

Set the backgrounds of your buttons to be transparent, and the gradient of the background will shine straight through. Don't forget to set IsHitTestVisible to True, though. Transparent buttons can't be pressed unless IsHitTestVisible is true;

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.