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 171363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:58:29+00:00 2026-05-11T12:58:29+00:00

I am setting a style for the Window in the App.xaml like such: <Application

  • 0

I am setting a style for the Window in the App.xaml like such:

<Application x:Class='MusicRepo_Importer.App' xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' xmlns:System='clr-namespace:System;assembly=mscorlib' StartupUri='TestMaster.xaml'>     <Application.Resources>          <Style TargetType='Window'>             <Setter Property='WindowStyle' Value='None'></Setter>         </Style>      </Application.Resources> </Application> 

With which I basically want every Window to have its WindowStyle’s property value set to None (to remove the default windows frame and border); But it is not working.

What am I missing here?

  • 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. 2026-05-11T12:58:29+00:00Added an answer on May 11, 2026 at 12:58 pm

    I believe you have to name the style and apply it to each window like the following..

    In app.xaml/resources..

    <Style x:Key='MyWindowStyle' TargetType='Window'>     <Setter Property='WindowStyle' Value='None'></Setter> </Style> 

    Then in the window.xaml..

    <Window x:Class='MusicRepo_Importer.MyWindow'     xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'     xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'     xmlns:sys='clr-namespace:System;assembly=mscorlib'     Title='MyStyledWindow' Style='{StaticResource MyWindowStyle}'> 

    This should work, but simply applying the style with TargetType for Window in the resource won’t force the Window to use that style although it seems to work for other elements.

    Edit:
    Found some info in relation to applying default styles to a window element..

    If you supply a TargetType, all instances of that type will have the style applied. However derived types will not… it seems. <Style TargetType='{x:Type Window}’> will not work for all your custom derivations/windows. <Style TargetType='{x:Type local:MyWindow}’> will apply to only MyWindow. So the options are

    Use a Keyed Style that you specify as the Style property of every window you want to apply the style. The designer will show the styled window.

    From the Question: How to set default WPF Window Style in app.xaml?

    The person who answered the question had a interesting idea about inheriting from a base window that has the style applied.

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

Sidebar

Related Questions

Given the very simple wpf app <Window x:Class=Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=Window1 Height=300 Width=800> <Grid>
Update After adding the following style and setting it for my application, I have
I've got a window I popup that I'd like to style the same as
I my WPF application I'd like to change the text color by setting Foreground
I've tried setting the style of the UINavigationbar to be a translucent style in
Setting the scene: My asp.net web application carries a version number which is incremented
When setting a style at #inline2 hiding it, Fancybox will appear empty on click.
I am writing a .Net COM DLL that runs inside a native Windows application.
I am setting peroperty Margin and Padding of a window and it doesn't take
I cannot get a button style to work in a Prism 4.0 app with

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.