My checkbox is rendered without a check mark. If I use only one checkbox (instance object) to render then I can get the check mark to show, but I cannot use this solution. I need be able to render it using the local checkbox. This checkbox has the Aero theme applied to it via "/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" and this is also a must have for me. Other themes built-in themes like Royal, and Luna render with a check mark.
XAML
<Canvas Name="canvas">
<Button Click="Button_Click" Canvas.Left="440" Canvas.Top="277">
Do Paint
</Button>
<Image Name="image"/>
</Canvas>
C#
private void Button_Click(object sender, RoutedEventArgs e) {
var checkBox = new CheckBox { Width = 100, Height = 30, IsChecked = true, };
var rectangle = new Rect(0, 0, checkBox.Width, checkBox.Height);
//need this
var visualBrush = new VisualBrush(checkBox);
checkBox.Arrange(rectangle);
var renderTargetBitmap = new RenderTargetBitmap((int)rectangle.Width, (int)rectangle.Height, 96, 96, PixelFormats.Default);
renderTargetBitmap.Render(checkBox);
renderTargetBitmap.Freeze();
image.Source = renderTargetBitmap;
}