Exemplo n.º 1
0
 public void SetControlSelected(Control ctrl, bool isSelected)
 {
     this.Dispatcher.Invoke((Action)delegate
     {
         if (isSelected)
         {
             ctrl.SetResourceReference(Control.StyleProperty, "SelectedCharStyle");
         }
         else
         {
             ctrl.SetResourceReference(Control.StyleProperty, "UnselectedCharStyle");
         }
     });
 }
Exemplo n.º 2
0
 public void SetControlSelected(Control ctrl, bool isSelected)
 {
     if (isSelected)
     {
         this.Dispatcher.Invoke((Action)delegate
         {
             if (ctrl.Name.Equals("resetBtn"))
             {
                 ctrl.SetResourceReference(Control.StyleProperty, "SelectedFilterResetBtnStyle");
             }
             else
             {
                 ctrl.SetResourceReference(Control.StyleProperty, "SelectedFilterInputStyle");
             }
         });
     }
     else
     {
         this.Dispatcher.Invoke((Action)delegate
         {
             if (ctrl.Name.Equals("resetBtn"))
             {
                 ctrl.SetResourceReference(Control.StyleProperty, "UnselectedFilterResetBtnStyle");
             }
             else
             {
                 ctrl.SetResourceReference(Control.StyleProperty, "UnselectedFilterInputStyle");
             }
         });
     }
 }
Exemplo n.º 3
0
		static void BindBackgroundBrush(Control elem, bool isCtxMenu) =>
			elem.SetResourceReference(DsImage.BackgroundBrushProperty, isCtxMenu ? "ContextMenuRectangleFill" : "ToolBarIconVerticalBackground");