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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:56:16+00:00 2026-06-10T05:56:16+00:00

I have 2 questions. 1st. I am using Silverlight for windows embedded compact 7

  • 0

I have 2 questions.

1st.
I am using Silverlight for windows embedded compact 7 and i have some problems with bindings.

i have template like this

<Style TargetType="RadioButton" x:Key="VoltageTab">
    <Setter Property="Width" Value="95"/>
    <Setter Property="Height" Value="61"/>
    <Setter Property="Margin" Value="193,0,192,3"/>
    <Setter Property="HorizontalAlignment" Value="Left"/>
    <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid Background="#00000000">
                            <Image x:Name="UnCheckedimg" Source="12.png"/>
                            <Image x:Name="Checkedimg" Visibility="Collapsed" Source="11.png"/>
                            <TextBlock x:Name="ModeName" FontSize="20" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="VOLTAGE" Foreground="#D25A32" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,4,0,0" />
                            <TextBlock  x:Name="ModeValue" FontSize="20" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="{TemplateBinding Content}" HorizontalAlignment="Center"  VerticalAlignment="Bottom" Margin="0,0,0,2"/>
                            <TextBlock x:Name="ModeNameChecked" Visibility="Collapsed" FontSize="34" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="VOLTAGE" Foreground="Black" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

I use TemplateBinding to bind ModeValue textblock, but i need another binding to bind ModeName. Can somone point me how to do this?

  1. I have another style

EDIT: 2nd style is posted below because editor didnt alowe me to post it here

It works ok if i only put text into content, but i want to you Run objects so i can format text inside buttons.

Is this possible and if not is there some other way to achive this?

Please keep in mind that i use Silverlight For Windows embedded.

Best regards,
Luka


 <Style x:Key="FunctionSelectButton" TargetType="RadioButton">
    <Setter Property="Width" Value="154"/>
    <Setter Property="Height" Value="61"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid Background="#00000000">
                        <Image x:Name="NormalImg" Source="mode_unpressed.png" Stretch="None"/>
                        <TextBlock x:Name="NormalText" Foreground="#D25A32" FontSize="26" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" HorizontalAlignment="Center" Text="{TemplateBinding Content}" VerticalAlignment="Center" Margin="0,0,0,0"></TextBlock>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Image for easyer representation -> Image

  • 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-10T05:56:17+00:00Added an answer on June 10, 2026 at 5:56 am

    To answer your first question, look here.

    Your 2nd question though, I’m not sure I understand entirely what the question is, but what I think you’re looking for would be setting it as a ContentPresenter with contenttemplate instead like;

    <Style x:Key="FunctionSelectButton" TargetType="RadioButton">
        <Setter Property="Width" Value="154"/>
        <Setter Property="Height" Value="61"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="RadioButton">
                        <Grid>
                            <Image x:Name="NormalImg" Source="mode_unpressed.png" Stretch="None"/>
                            <ContentPresenter x:Name="contentPresenter"
                                              Margin="{TemplateBinding Padding}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              Content="{TemplateBinding Content}"
                                              ContentTemplate="{TemplateBinding ContentTemplate}" />
    
    <!--
    <TextBlock x:Name="NormalText" Foreground="#D25A32" FontSize="26" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" HorizontalAlignment="Center" Text="{TemplateBinding Content}" VerticalAlignment="Center" Margin="0,0,0,0"></TextBlock>
    -->
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
    

    <Button Content="{Binding RPE-2WIRE}" Style="{StaticResource FunctionSelectButton}" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Foreground="#D25A32" FontSize="26" />
    

    At least that’s what I think you’re saying 🙂

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

Sidebar

Related Questions

I want to create some simple navigation in sencha touch 2. I have questions
I have some questions concering routing with Codeigniter. What I´m doing now is the
I have some questions regarding the following css that I found: html, body {
I have almost solved this quadrant queries problem of Interviewstreet using segment trees with
I have 2 questions...my 1st question is how do I limit the number of
Been using this site for ages and have never had to go as far
I have questions about System.Threading.ThreadStart Class : where can I find its specifications (
I am going to be making a small user system but I have questions.
have 2 questions : A computer with 32-bit address uses 2-level page table (9
similar questions have been asked before but I cant find an exact match to

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.