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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:31:48+00:00 2026-05-11T14:31:48+00:00

Without using code, how can I turn this into a Template? I have about

  • 0

Without using code, how can I turn this into a Template?

I have about 10 of these, and my code is getting huge. It is working perfectly, I am just looking for ways to clean up the code, I am just not familiar enough with templating and resourcing animations and triggers to do this.

Thanks in advance.

    <RadioButton Width='35' Height='35' Content='RadioButton' Visibility='Visible' IsChecked='False' Margin='2.5,2.5,2.5,2.5' Template='{DynamicResource RadioTemplate}' >         <RadioButton.Resources>             <ControlTemplate x:Key='RadioTemplate' TargetType='{x:Type RadioButton}'>                 <BulletDecorator Background='Transparent'>                     <BulletDecorator.Bullet>                         <StackPanel>                             <Image Width='Auto' Height='Auto' Source='..\Content\img.png' Stretch='Fill' />                         </StackPanel>                     </BulletDecorator.Bullet>                 </BulletDecorator>             </ControlTemplate>         </RadioButton.Resources>         <RadioButton.BitmapEffect>             <OuterGlowBitmapEffect x:Name='imageGlow' GlowColor='#FFeeba00' Opacity='1' GlowSize='0' />         </RadioButton.BitmapEffect>         <RadioButton.Triggers>             <EventTrigger RoutedEvent='ToggleButton.Checked'>                 <BeginStoryboard>                     <Storyboard>                         <DoubleAnimation Storyboard.TargetName='imageGlow' Storyboard.TargetProperty='GlowSize' From='0' To='10' Duration='0:0:.15' AutoReverse='False' />                     </Storyboard>                 </BeginStoryboard>             </EventTrigger>             <EventTrigger RoutedEvent='ToggleButton.Unchecked'>                 <BeginStoryboard>                     <Storyboard>                         <DoubleAnimation Storyboard.TargetName='imageGlow' Storyboard.TargetProperty='GlowSize' From='10' To='0' Duration='0:0:.15' AutoReverse='False' />                     </Storyboard>                 </BeginStoryboard>             </EventTrigger>         </RadioButton.Triggers>     </RadioButton> 
  • 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. 2026-05-11T14:31:49+00:00Added an answer on May 11, 2026 at 2:31 pm

    You need to create a style.

    <Style x:Key='RadioStyle' TargetType='{x:Type RadioButton}'>     <Setter Property='Width' Value='35'/>     <Setter Property='Height' Value='35'/>     <Setter Property='Margin' Value='2.5'/>     <Setter Property='BitmapEffect'>         <Setter.Value>             <OuterGlowBitmapEffect GlowColor='#FFeeba00' Opacity='1' GlowSize='0' />         </Setter.Value>     </Setter>     <Setter Property='Template'>         <Setter.Value>             <ControlTemplate TargetType='{x:Type RadioButton}'>                 <BulletDecorator Background='Transparent'>                     <BulletDecorator.Bullet>                         <StackPanel>                             <ContentPresenter/>                         </StackPanel>                     </BulletDecorator.Bullet>                 </BulletDecorator>             </ControlTemplate>         </Setter.Value>     </Setter> <!--Continued--> 

    And the rest (SO seems to cut off long code snippets):

        <Style.Triggers>         <EventTrigger RoutedEvent='ToggleButton.Checked'>             <BeginStoryboard>                 <Storyboard>                     <DoubleAnimation Storyboard.TargetProperty='BitmapEffect.GlowSize' From='0' To='10' Duration='0:0:.15' AutoReverse='False' />                 </Storyboard>             </BeginStoryboard>         </EventTrigger>         <EventTrigger RoutedEvent='ToggleButton.Unchecked'>             <BeginStoryboard>                 <Storyboard>                     <DoubleAnimation Storyboard.TargetProperty='BitmapEffect.GlowSize' From='10' To='0' Duration='0:0:.15' AutoReverse='False' />                 </Storyboard>             </BeginStoryboard>         </EventTrigger>     </Style.Triggers> </Style> 

    For each button, you’ll have something like this:

    <RadioButton Style='{DynamicResource RadioStyle}' Visibility='Visible' IsChecked='False'>     <Image Width='Auto' Height='Auto' Source='..\Content\img.png' Stretch='Fill' /> </RadioButton> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 192k
  • Answers 192k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer for each statement in VC++, when used on a non-managed… May 12, 2026 at 6:17 pm
  • Editorial Team
    Editorial Team added an answer I expect that the props file is related to the… May 12, 2026 at 6:17 pm
  • Editorial Team
    Editorial Team added an answer I almost hate to say this after all the mental… May 12, 2026 at 6:17 pm

Related Questions

I am working on an iPhone application and would really like to determine if
I have a set of objects in a hierachy. There's a top root node
Right now I am working on a new database that will show changes to
I have a .NET 2008 solution with a project that acts as WCF Service

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.