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!
You’ll need to override the default template. Add the following style to your App.xaml resources as a starting point:-
Now you style your checkbox:-