internal void UnfocusControl(AControl control) { if (control == null || !control.IsEnabled) { return; } control.IsEnabled = false; control.IsEnabled = true; }
private static void styleTemplated(Avalonia.Controls.Primitives.TemplatedControl ctrl, Style style) { if (style?.foregroundColor.IsSet == true) { ctrl.Foreground = new SolidColorBrush(style.foregroundColor.Value); } if (style?.backgroundColor.IsSet == true) { ctrl.Background = new SolidColorBrush(style.backgroundColor.Value); } }