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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:25:37+00:00 2026-06-03T02:25:37+00:00

to minimize the code-lines in WPF all my controls inherit from a style called

  • 0

to minimize the code-lines in WPF all my controls inherit from a style called BaseControlStyle that looks something like this:

<Style x:Key="BaseControlStyle" TargetType="{x:Type FrameworkElement}">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Style.Triggers>
        <Trigger Property="IsEnabled" Value="false">
            <Setter Property="Opacity" Value="0.5"/>
        </Trigger>
    </Style.Triggers>
</Style>

A new Button Style would look like this:

<Style x:Key="ButtonStyle" TargetType={x:Type Button} BasedOn="{StaticResource BaseControlStyle}">
....
</Style>

But being new to Silverlight I could not find a answer whether it is possible to transfer this BaseControlStyle to into a SilverlightBaseControlStyle that uses VisualStateManager (or something else) or not?

  • 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-03T02:25:39+00:00Added an answer on June 3, 2026 at 2:25 am

    Unfortunately, there’s no such thing as property triggers in Silverlight – Visual States are used instead, which means handling appearance in code. For such tasks as in your case it is easier to create a copy of a standard Button’s style and change animations in it’s default ControlTemplate.
    Sometimes it is also useful to use behaviors.

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

Sidebar

Related Questions

I just wanna find out if there's a way I could minimize code clutter
I need to remove the maximize and minimize buttons from a JFrame . Please
Sometimes, when using macros to generate code, it is necessary to create identifiers that
I ported one project from Visual C++ 6.0 to VS 2010 and found that
I'm trying to write code that will traverse an undirected, unweighted graph. Essentially, the
I have this code to center an image between two horizontal lines. CSS: .line-scale-left
I'm trying to minimize my code and have put together this little snippet, it
I have a C# project and some code pages have few thousand lines of
I would like to draw some simple drawings (lines, circles, etc.) on panel in
I have written a code that draws grids and a triangle inside one grid

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.