using System.Text;
using Microsoft.UI.Xaml.Markup;
namespace XFEEDToolBox.Controls;
public sealed partial class GalaxyFilterPanel
{
private void InstallStaticCheckBoxTemplate()=>Resources[typeof(CheckBox)]=CreateStaticCheckBoxStyle();
internal static Style CreateStaticCheckBoxStyle()
{
// The platform AnimatedAccept glyph can retain its initial frame even
// after CheckBox has entered CheckedNormal. Keep native CheckBox input,
// accessibility and three-state semantics, with explicit static marks.
var states=new StringBuilder();
foreach(var value in new[]{"Unchecked","Checked","Indeterminate"})
foreach(var interaction in new[]{"Normal","PointerOver","Pressed","Disabled"})
{
var selected=value!="Unchecked";
states.Append($"""
""");
}
return (Style)XamlReader.Load($$"""
""");
}
}