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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:59:59+00:00 2026-06-05T18:59:59+00:00

I am trying to apply global application styles to certain control types, however adding

  • 0

I am trying to apply global application styles to certain control types, however adding these styles to Application.Resources does is not applying the styles to the elements in my views.

Example:

<Application x:Class="GUI.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Application.Resources>
        <Style TargetType="{x:Type TextBox}">
            <Setter Property="Background" Value="AliceBlue"></Setter>
            <Setter Property="Margin" Value="20,20,20,20"></Setter>
            <Setter Property="FontStyle" Value="Italic"></Setter>
        </Style>
    </Application.Resources>
</Application>

In all the examples I have found for applying application wide styles this has been how they say to do it, however it is not working for me. What am I doing wrong?

Thanks,
Alex.

  • 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-05T19:00:00+00:00Added an answer on June 5, 2026 at 7:00 pm

    Worked this out myself woops, the problem is I was not using the StartUpUri property to open my initial application view, I changed my start up process so it does use this property and this has fixed my problem.

    My App.xaml now looks like this:

    <Application x:Class="GUI.App"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 StartupUri="/Views/Application/SplashView.xaml">
        <Application.Resources>
            <Style TargetType="{x:Type TextBox}">
                <Setter Property="Background" Value="Aqua"></Setter>
            </Style>
        </Application.Resources>
    </Application>
    

    Thanks,
    Alex.

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

Sidebar

Related Questions

I'm trying to apply cursor to my app, however, the document is not clear
I'm trying to apply css with GWT Button widget, however I can apply CSS
I'm trying to apply styles to the last <p> in a div. I'd like
Im trying to apply the state pattern on a multi threaded application.The problem is
So I'm trying to use both local and global resources in a simple Net
I am trying to apply styles to HTML tags dynamically by reading in the
I am trying to apply a scale animation to a rectangle, using code not
Trying to apply a 301 redirect to this url /Qx%40w%2C6M42VAwp3%40Rb%7B~cC4ure%60QWI9 but it's not liking
i'm trying to apply the MVVM pattern in my application with MVVM Light. I've
Im trying to apply different background color to even and odd items in a

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.