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

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The first parameter of the RouteLink method is for the… May 11, 2026 at 3:13 pm
  • added an answer To use a dynamic array with the Move procedure, you… May 11, 2026 at 3:13 pm
  • added an answer You would want to create a base class, and keep… May 11, 2026 at 3:13 pm

Related Questions

I have some code that works and changes the style sheet using a form.
I am preparing for the development of an enterprise-style application for a very small
I am working on a .NET 3.5 project which consists of a web application
Follow up to this question: Winforms Style / UI Look and Feel Tips So

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.