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

  • Home
  • SEARCH
  • 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 8720033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:56:22+00:00 2026-06-13T06:56:22+00:00

How to create a style based on default style in Silverlight? For example, in

  • 0

How to create a style based on default style in Silverlight?

For example, in WPF we make it like:

<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
  <Setter Property="Margin" Value="2" />
  <Setter Property="Padding" Value="2" />
</Style>
  • 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-13T06:56:24+00:00Added an answer on June 13, 2026 at 6:56 am

    Pretty much the same. Just minus the x:Type with more explicit naming.

    <Style TargetType="TextBox" BasedOn="{StaticResource DefaultTextBoxStyle}">
    

    More information here in the docs. PS, in case you need the default templates, TextBox for example would normally be found in CoreStyles.xaml

    ADDENDUM as requested in the comments in case you’re confused at the first read of the answer;

    “you DO need a base style, which is really easy to do as you’re meant to do it in an application theme like silverlight provides by default (wpf/uwp etc won’t have these) that creates the files like ToolkitStyles.xaml, SDKStyles.xaml, CoreStyles.xaml, etc… Which is WHERE the staticresource name in the answer came from as targeting a silverlight version from the year this was originally answered.”

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

Sidebar

Related Questions

I tried to create a Style for DataGridTextColumn with the following code <Style TargetType={x:Type
Possible Duplicate: JavaScript library to create div-style window within page I would like to
in my silverlight application i want to create a style from code behind and
I create my own style attribute like this: <attr name=color_foreground format=color|reference /> and I
I want to create a custom style for an activity that will look like
For a custom image selection tool I would like to create form validation based
I would like to create a custom WPF control that inherits from comboBox. So
I have this code to create dynamic button style based on generated points from
I'm trying to create a style that will attach a Converter to it so
I'm using jQuery's Themeroller to create a style for my web application. I am

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.