コード例 #1
0
 internal void UnfocusControl(AControl control)
 {
     if (control == null || !control.IsEnabled)
     {
         return;
     }
     control.IsEnabled = false;
     control.IsEnabled = true;
 }
コード例 #2
0
        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);
            }
        }