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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:15:33+00:00 2026-05-27T10:15:33+00:00

My intent is to override phone theme. By default page markup has following code:

  • 0

My intent is to override phone theme. By default page markup has following code:

<phone:PhoneApplicationPage 
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"

I replace it with a style reference:

<phone:PhoneApplicationPage 
Style="{StaticResource stylePage}"    

Style is defined in app resources like this:

<Application.Resources>
    <Style x:Key="stylePage" TargetType="phone:PhoneApplicationPage">
        <Setter Property="Background" Value="White" />
        <Setter Property="Foreground" Value="DeepSkyBlue" />
        <Setter Property="FontFamily" Value="Arial" />
    </Style>
</Application.Resources>

But background is still black, and font is white. Debugger shows that the values were applied.
If I set VisualRoot Grid’s background, it’s applied, but I want to set fontfamily and foreground values to be used by all my controls by default. Is it possible?

  • 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-05-27T10:15:34+00:00Added an answer on May 27, 2026 at 10:15 am

    According to this msdn article – only the following properties are inherited in the visual tree in Silverlight: FontFamily, FontSize, FontStretch, FontStyle, FontWeight, and Foreground. Normally – dependency properties are not inherited in Silverlight (they often are in WPF). This is likely why these are not mentioned in the Silverlight MSDN article on dependency property value precedence, but the WPF version of the article mentions inherited value as lower priority than the local value or style setters. Your solution in fact works to some degree, but by default – most controls have font properties set by their style – Buttons by their default style, TextBlocks in page templates use PhoneTextNormalStyle or PhoneTextTitle1Style. If you remove the XML attributes setting the style of your TextBlocks – your application-wide font properties will apply to the TextBlocks.

    Background dependency property unfortunately is not inherited, so your background will remain as is.

    Your application-wide properties will not work on controls more complex than TextBlocks – like Buttons, since the default style of Buttons and other controls defines the style of TextBlocks explicitly using appropriate system styles.

    I would say you should create your own resource dictionaries with styles of your controls and apply these to your controls manually, otherwise – you would need to write some code to automatically replace these properties at run time.

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

Sidebar

Related Questions

i have the following code that lists all the jpeg in the phone's gallery.
NSResponder has a method you override called - indent:, but unsure when it would
Does Android broadcast an intent when the network state has changend, i.e. from GSM
I have the following code to get a list of installed apps on the
I want to override the default android messaging application. If I receive a sms
The intent here is to deal with obfuscated passwords for resources. We have an
I want my intent to be launched when the user goes to a certain
I have a intent receiver in my android manifest, but would like to give
I'm trying to use a standard Intent that will take a picture, then allow
How do I set the intent of menu items defined in an Android menu

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.