SplitButton changes behavior depending on VariantSize

Ribbon for WPF Forum

Posted 3 years ago by Moondance
Version: 16.1.0632
Avatar

Hello,

I am adding to my ribbon a control that like Powerpoint lets you change the fill/border etc color of a shape.

For it I am using the ribbon  SplitButton.

It has an image and a label.

Now If I set the VariantSize to Large (which I do not want really)  I see that the label is selected together with the dropdown arrow(which is what I want).

If I set the VarianSize to Medium or Small (which I want) I see that the label is NOT selected together with the dropdown arrow(which I do not want).

How can I achieve the Powerpoint type behavior without having to set the VariantSize to Large?

Thanks.

Comments (3)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We mimic how Office renders controls like split buttons.  When I look at Office apps, they render the same as what our controls currently do.  Can you give a specific example of where you see differently?  For instance, the "Replace" button in Powerpoint's Home tab is a SplitButton in medium variant and the arrow is by itself.  The "Select" button right below it is a PopupButton instead.


Actipro Software Support

Posted 3 years ago by Moondance
Avatar

I am looking at the "Shape Fill" button in Powerpoint. I see that the text is with the dropdown arrow. In other words I can click on the text and the color picker shows up, you do not need to click on the small down arrow

So I wrote the following xaml

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<ribbon:SplitButton Label="Shape Fill1" Grid.Column="0" Height="25" Width="140" VariantSize="Medium" ImageSourceSmall="C:\\Users\\dvadmin\\Desktop\\MyIcons\\ShapeFill_16x16.png"></ribbon:SplitButton>
<ribbon:SplitButton Label="Shape Fill2" Grid.Column="1" Height="40" Width="100" VariantSize="Large" ImageSourceLarge="C:\\Users\\dvadmin\\Desktop\\MyIcons\\ShapeFill_32x32.png"></ribbon:SplitButton>
</Grid>

In the VarianSize= Large when user clicks on text the dropdown open, in case VariantSize=Medium it does not, the user needs to click on the small arrow.

In Powerpoint one can still click on the text and the dropdown opens.

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thank you, we hadn't seen that usage kind before.  We will mark down the request for adding support for this layout kind.  In the meantime, you would have to use the large variant or retemplate the control (which isn't easy).


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.