private void CustomWindow_SourceInitialized(object sender, EventArgs e)
 {
     RenderHelper.ChangeRenderModeToSoftware(sender);
 }