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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:40:43+00:00 2026-06-13T17:40:43+00:00

Implicit Style not working in App.xaml, but is working with local page resources. How

  • 0

Implicit Style not working in App.xaml, but is working with local page resources. How do I make a global style for a control?

<navigation:Page.Resources>
 <Style TargetType="Button">
  <Setter Property="Background" Value="Red" />
  <Setter Property="Foreground" Value="Navy" />
 </Style>
</navigation:Page.Resources>
  • 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-13T17:40:44+00:00Added an answer on June 13, 2026 at 5:40 pm

    In App.xaml

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="StilDict.xaml" />
            </ResourceDictionary.MergedDictionaries>
     </ResourceDictionary>
    

    In StilDict.xaml

    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      ,,,, and what you use else>
    <Style x:Key="ButtonStyleNavyOnRed" TargetType="Button">
    <Setter Property="Background" Value="Red" />
    <Setter Property="Foreground" Value="Navy" />
    </Style>
    

    using style anywhere on your project

     <UserControl>
        <Button Style={StaticResource ButtonStyleNavyOnRed} Content="Yahoo! :)"/>
     </UserControl>
    

    Important Note if you delete x:Key=”ButtonStyleNavyOnRed” part all of your Target types get this style, but not Button derived objects. http://msdn.microsoft.com/en-us/library/system.windows.style(v=vs.95).aspx

    Hope Helps!

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

Sidebar

Related Questions

Make's implicit rules are supposedly there to make writing Makefiles easier but, if my
I placed this control in a test app, and it works fine. But in
I have a default TextBlock style defined in App.xaml, which seems to also affect
I understand semicolon implicit insertion, but I'm not sure it's occurs in case of
Which one is better (implicit control flow via return or control flow via if
I read in the c99 Standard: -remove implicit function declaration, -remove implicit int. But
Solution: UserControl is not the actual type, so I cannot use Implicit Styles on
I was looking at this question and noticed that placing an implicit TextBlock style
I want to perform implicit logout of my app when ever my app gets
I'm a scientist working mostly with C++, but I would like to find 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.