Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:10:04+00:00 2026-06-14T03:10:04+00:00

May i know how to set the window style or color? The image below

  • 0

May i know how to set the window style or color? The image below is my WPF
enter image description here

I want to set my window become something like the app below:

enter image description here

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:10:05+00:00Added an answer on June 14, 2026 at 3:10 am

    As far as I can remember (It is more than 4 years ago), you can create a style to use with a WPF window.

    This is a sample window Style:

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 
        <Style x:Key="MainWindow" 
               TargetType="{x:Type Window}"> 
            <Setter Property="Foreground" 
                    Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" /> 
            <Setter Property="Template"> 
                <Setter.Value> 
                    <ControlTemplate TargetType="{x:Type Window}"> 
                        <Grid> 
                            <Border x:Name="MainBorder" 
                                    BorderBrush="{DynamicResource MainWindowBorderBrush}" 
                                    BorderThickness="1" 
                                    CornerRadius="2" 
                                    Background="{DynamicResource MainWindowBackgroundBrush}"> 
                                <DockPanel LastChildFill="True"> 
                                    <Rectangle x:Name="PART_LEFT_BORDER" 
                                               Width="2" 
                                               Cursor="SizeWE"> 
                                        <Rectangle.Fill> 
                                            <SolidColorBrush Color="Transparent" /> 
                                        </Rectangle.Fill> 
                                    </Rectangle> 
                                    <Rectangle x:Name="PART_RIGHT_BORDER" 
                                               Cursor="SizeWE" 
                                               Width="2" 
                                               DockPanel.Dock="Right"> 
                                        <Rectangle.Fill> 
                                            <SolidColorBrush Color="Transparent" /> 
                                        </Rectangle.Fill> 
                                    </Rectangle> 
                                    <Rectangle x:Name="PART_TOP_BORDER" 
                                               Cursor="SizeNS" 
                                               DockPanel.Dock="Top" 
                                               Height="2"> 
                                        <Rectangle.Fill> 
                                            <SolidColorBrush Color="Transparent" /> 
                                        </Rectangle.Fill> 
                                    </Rectangle> 
                                    <Rectangle x:Name="PART_BOTTOM_BORDER" 
                                               Cursor="SizeNS" 
                                               Height="2" 
                                               DockPanel.Dock="Bottom"> 
                                        <Rectangle.Fill> 
                                            <SolidColorBrush Color="Transparent" /> 
                                        </Rectangle.Fill> 
                                    </Rectangle> 
                                    <Border x:Name="PART_TITLEBAR" 
                                            Margin="2,0,2,2" 
                                            Height="40" 
                                            DockPanel.Dock="Top" 
                                            CornerRadius="2" 
                                            Background="Transparent"> 
                                        <DockPanel LastChildFill="False"> 
                                            <TextBlock Margin="8,0,0,4" 
                                                       VerticalAlignment="Center" 
                                                       FontStretch="UltraExpanded" 
                                                       Foreground="Black" 
                                                       TextTrimming="CharacterEllipsis" 
                                                       TextWrapping="NoWrap" 
                                                       Text="{TemplateBinding Title}" 
                                                       FontSize="16" /> 
                                            <Button x:Name="PART_CLOSE" 
                                                    DockPanel.Dock="Right" 
                                                    Style="{DynamicResource FlatButton}" 
                                                    VerticalAlignment="Center" 
                                                    Margin="0,0,4,0"> 
                                                <Image Source="/MixModes.Synergy.Resources;
                            component/Resources/Close.png" 
                                                       Stretch="None" 
                                                       Margin="4" /> 
                                            </Button> 
                                            <Button x:Name="PART_MAXIMIZE_RESTORE" 
                                                    DockPanel.Dock="Right" 
                                                    HorizontalAlignment="Center" 
                                                    VerticalAlignment="Center" 
                                                    Style="{DynamicResource FlatButton}"> 
                                                <Image x:Name="MaximizeRestoreImage" 
                                                       Source="/MixModes.Synergy.Resources;
                            component/Resources/Restore.png" 
                                                       Stretch="None" 
                                                       Margin="4" /> 
                                            </Button> 
                                            <Button x:Name="PART_MINIMIZE" 
                                                    HorizontalAlignment="Center" 
                                                    Style="{DynamicResource FlatButton}" 
                                                    VerticalAlignment="Center" 
                                                    DockPanel.Dock="Right"> 
                                                <Image Margin="4" 
                                                       Source="/MixModes.Synergy.
                            Resources;component/Resources/
                            Minimize.png" 
                                                       Stretch="None" /> 
                                            </Button> 
                                        </DockPanel> 
                                    </Border>
    
                                    <!-- Title bar separator--> 
                                    <Border Height="1" 
                                            DockPanel.Dock="Top" 
                                            Background="{DynamicResource 
                        MainWindowTitleBarSeparator}" />
    
                                    <!-- Actual Window Content --> 
                                    <AdornerDecorator DockPanel.Dock="Bottom"> 
                                        <ContentPresenter /> 
                                    </AdornerDecorator> 
                                </DockPanel> 
                            </Border> 
                        </Grid> 
                        <ControlTemplate.Triggers>                        
                            <DataTrigger Binding="{Binding RelativeSource=
                    {RelativeSource Self}, Path=Maximized}" 
                                         Value="False"> 
                                <Setter TargetName="MaximizeRestoreImage" 
                                        Property="Source" 
                                        Value="/MixModes.Synergy.Resources;
                    component/Resources/Maximize.png" /> 
                            </DataTrigger> 
                        </ControlTemplate.Triggers> 
                    </ControlTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
    </ResourceDictionary>
    

    And the result will look like this:

    http://www.codeproject.com/KB/WPF/CustomWPFWindow/8.png

    Read more on Create Custom Windows in WPF with Ease

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this may be obvious, but i didn't set the background to any
I have a ARGB image data. I wish to set my window icon to
You may know this recommendation from Microsoft about the use of exceptions in .NET:
You may know the scriptaculous SlideUp effect . Well, It slides up a div
So as you may know, arrays in C# implement IList<T> , among other interfaces.
As you may know, Silverlight 3 doesn't support IMultiValueConverter and... I badly need it.
As some of you may know, use of the LIMIT keyword in MySQL does
As you may know, when we have this code in Javascript : function getName()
As some of you may know in python2.7/3.2 we'll get OrderedDict with PEP372 however
As you may know, in many occasions, there is a need to flag some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.