Example on how to use ActionStyle.ToggleButton

I know that a ribbon action has a Style property which exposes ActionStyle.ToggleButton but I can't find any examples in the GitHub repo (Sdl-Community) of how this is used.

From trial-and-error I can see that there's a Checked property which does hold the state, but the ribbon element doesn't toggle like I would expect it to - it offers no visual indication of state.

Should it offer any indication of state or am I expecting too much? I expected it to exhibit some sort of depressed or raised appearance.

3 Replies Latest Replies: 14 Nov 2018 10:24 AM by Angela Sigee
  • You set the style in the constructor like this:

    public MyAction()
    {
        base.Style = ActionStyle.ToggleButton;
    }

    and then inspect/modify its state using

       base.Checked

    The visual indication is a slightly tainted background, hardly visible on small buttons like on the QAT.


Related