Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a rather peculiar problem.
I have a CheckBox within a UserControl. Its unchecked by default.
When checked, the stroke (or tick) looks faded or washed out.

The following is the xaml code for the checkbox.
XML
<StackPanel>
     <CheckBox Content="xyz" Name ="Check1"/>
     <CheckBox Margin="5" Content="SomeContent" Name="Check2" Click="OnClicked"/>
</StackPanel>


The following is the backend code:
C#
void OnClicked(object sender, RoutedEventArgs e)
{
   // I intend to eventually filter a DataGrid when clicked on the check box
   CheckBox ck = sender as CheckBox;
   if(ck.IsChecked == true)
   {
      // Set some variable to true
   }
   else
   {
      // Set some variable to false
   }
   FilterGrid();  
}
void FilterGrid()
{
   // Apply filters to the DataGrid view collection
}


I initially thought that the method FilterGrid might be causing some kinda lag, but it does not.

Please help me out on this.

Thanks in advance.
Posted
Comments
Naz_Firdouse 8-Jun-15 9:34am    
set the checkbox checked initially and see whether it looks good or not.
If it is not ok, then you may need to apply style to the checkbox.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900