Esempio n. 1
0
 public static TreeViewItem GetIsExpanderButtonOf(ToggleButton element)
 {
     if (element == null)
     {
         throw new ArgumentNullException("element");
     }
     return(element.GetValue(IsExpanderButtonOfProperty) as TreeViewItem);
 }
        static void b_Click(object sender, RoutedEventArgs e)
        {
            ToggleButton box = (sender as ToggleButton);

            if (box != null)
            {
                ICommand command = box.GetValue(CommandProperty) as ICommand;
                if (command != null)
                {
                    command.Execute(box);
                }
            }
        }
 private int GetScaleValue()
 {
     foreach (Control c in this.ScaleButtonsGrid.Children)
     {
         if (c.GetType() == typeof(ToggleButton))
         {
             ToggleButton tb = (ToggleButton)c;
             if ((bool)tb.IsChecked)
             {
                 return(((int)tb.GetValue(Grid.ColumnProperty) - 1) * 2);
             }
         }
     }
     return(0);
 }
 public static object GetCheckedContent(ToggleButton toggleButton)
 {
     return((object)toggleButton.GetValue(CheckedContentProperty));
 }
 public static Color?GetShadowColor(ToggleButton toggleButton)
 {
     return((Color?)toggleButton.GetValue(ShadowColorProperty));
 }
 public static Brush GetHoverBrush(ToggleButton toggleButton)
 {
     return((Brush)toggleButton.GetValue(HoverBrushProperty));
 }
 public static ToggleButtonStyle GetToggleButtonStyle(ToggleButton toggleButton)
 {
     return((ToggleButtonStyle)toggleButton.GetValue(ToggleButtonStyleProperty));
 }
 public static object GetIcon(ToggleButton toggleButton)
 {
     return((object)toggleButton.GetValue(IconProperty));
 }
Esempio n. 9
0
 public static String GetGroupName(ToggleButton element)
 {
     return(element.GetValue(GroupNameProperty).ToString());
 }
Esempio n. 10
0
 public static Brush GetCheckedBackground(ToggleButton target) => (Brush)target.GetValue(CheckedBackgroundProperty);
Esempio n. 11
0
 public static UiMode GetGuiMode(ToggleButton obj)
 {
     return((UiMode)obj.GetValue(GuiModeProperty));
 }
 public static ImageSource GetIcon(ToggleButton button)
 {
     return(button.GetValue(IconProperty) as ImageSource);
 }
 public static IToggleCommand?GetToggleCommand(ToggleButton obj)
 {
     return((IToggleCommand)obj.GetValue(ToggleCommandProperty));
 }
 public static object?GetToggleCommandParameter(ToggleButton obj)
 {
     return((object)obj.GetValue(ToggleCommandParameterProperty));
 }
 public static bool GetIsWaiting(ToggleButton toggleButton)
 {
     return((bool)toggleButton.GetValue(IsWaitingProperty));
 }
 public static object GetWaitingContent(ToggleButton toggleButton)
 {
     return((object)toggleButton.GetValue(WaitingContentProperty));
 }
Esempio n. 17
0
 public static Brush GetCheckedForeground(ToggleButton button)
 {
     return((Brush)button.GetValue(CheckedForegroundProperty));
 }
 public static IconPosition GetIconPosition(ToggleButton toggleButton)
 {
     return((IconPosition)toggleButton.GetValue(IconPositionProperty));
 }
Esempio n. 19
0
 internal static bool GetHook(ToggleButton toggleButton)
 {
     return((bool)toggleButton.GetValue(HookProperty));
 }
 public static ClickStyle GetClickStyle(ToggleButton toggleButton)
 {
     return((ClickStyle)toggleButton.GetValue(ClickStyleProperty));
 }
Esempio n. 21
0
 public static IconPlacement GetIconPlacement(ToggleButton button)
 {
     return((IconPlacement)button.GetValue(IconPlacementProperty));
 }
 public static Brush GetCheckedBrush(ToggleButton toggleButton)
 {
     return((Brush)toggleButton.GetValue(CheckedBrushProperty));
 }
Esempio n. 23
0
 public static Brush GetHoverForeground(ToggleButton button)
 {
     return((Brush)button.GetValue(HoverForegroundProperty));
 }
Esempio n. 24
0
 public static Popup GetAttach(ToggleButton obj) => (Popup)obj.GetValue(AttachProperty);
 public static Control GetElementToFocus(ToggleButton button)
 {
     return((Control)button.GetValue(ElementToFocusProperty));
 }
 public static CornerRadius GetCornerRadius(ToggleButton toggleButton)
 {
     return((CornerRadius)toggleButton.GetValue(CornerRadiusProperty));
 }
 public static Style GetPendingSpinnerStyle(ToggleButton toggleButton)
 {
     return((Style)toggleButton.GetValue(PendingSpinnerStyleProperty));
 }