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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:31:36+00:00 2026-05-22T02:31:36+00:00

As a silverlight newbie, I want to create a boxless readonly checkbox in silverlight4

  • 0

As a silverlight newbie, I want to create a boxless readonly checkbox in silverlight4 to show a green checkmark. I don’t manage to get the box invisible/transparent or make the checkmark green, it stays grey.

What I tried:

        cbstatus = new CheckBox();
        cbstatus.IsEnabled = false; // read only
        cbstatus.Visibility = System.Windows.Visibility.Visible;
        cbstatus.Background =  new SolidColorBrush(Colors.Transparent);
        cbstatus.BorderBrush = new SolidColorBrush(Colors.Transparent);
        cbstatus.Foreground = new SolidColorBrush(Colors.Green);

Thanks for any ideas!

  • 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-22T02:31:37+00:00Added an answer on May 22, 2026 at 2:31 am

    You’ll need to override the default template. Add the following style to your App.xaml resources as a starting point:-

    <Style x:Key="BorderlessReadOnlyCheckBox" TargetType="CheckBox">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Padding" Value="4,1,0,0"/>
        <Setter Property="IsEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="16"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CheckIcon" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" Height="16">
                            <Path x:Name="CheckIcon" Margin="1,1,0,1.5" Fill="Green" Stretch="Fill" Opacity="0" Width="10.5" Height="10" Data="M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z" FlowDirection="LeftToRight"/>
                        </Grid>
                        <ContentPresenter
                              Grid.Column="1"
                              x:Name="contentPresenter"
                              Content="{TemplateBinding Content}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    

    Now you style your checkbox:-

    cbstatus = new CheckBox();
    cbstatus.Style = (Style)Application.Current.Resources["BorderlessReadOnlyCheckBox"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm newbie to silverlight. Please help me find setting page title. See I don't
Silverlight newbie question: I've got a small Silverlight application with the following XAML snippet:
Silverlight does not provide perfmon counters for GC. How do i get GC Information?
I'm a Silverlight newbie. Just downloaded version 3.0 after the Mix announcement. I'm running
Silverlight Out-of-browser applications get installed to a seemingly random location: AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser\2333572144.www.microsoft.com for example. Currently,
I'm a newbie to Silverlight and I'm having some trouble finding a solution to
Silverlight newbie here, so I apologize if this question isn't even worded correctly. I
Newbie question... I am using silverlight to POST data to my GAE application class
In Silverlight, a frequently used pattern is: Request data Get back an empty container
In Silverlight, say we start an async request: var request = WebRequest.Create(uri); and then

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.