This is a migrated thread and some comments may be shown as answers.

Resizing textboxes and comboboxes

2 Answers 76 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Inger Marie
Top achievements
Rank 1
Inger Marie asked on 12 Apr 2017, 07:20 AM

1.

I have a radgridview, which contains RadRibbonGroups, which contains comboxboxes and textboxes.

However, I would also like to be able to resize the textboxes and comboboxes in the medium state. I could program it in XAML if I knew how to bind to  the RadRibbonGroup to get the current variant used. Or how to use wrap my controls in RadCollapsiblePanel inside the ribbongroup and bind to a property which contains the current state (small, medium, large).

? Is there a way to bind to the the current size variant of the group? I dont know which property to use.

 

2.

On another RadGridView, the RadRibbonGroups does not contain RadCollapsiblePabel and when it collapses, it collapses into a single collapse into a single button with an (ugly) standard picture.

? Is there any way to change this picture?

 

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 13 Apr 2017, 10:53 AM
Hеllo Inger,

I noticed you are talking about RadGridView but I guess you mean RadRibbonView. 

Let me get to your questions:
  • Is there a way to bind to the current size variant of the group?
    You can get the currently applied variant of the group via the Variant property of RadRibbonGroup. However, you cannot force the group to go into a specific variant. If you want to know when the Variant property changes you can bind it using OneWayToSource binding mode. Since, the property has only a public getter you won't be able to do the binding in XAML, instead, you can define it in code-behind.
    var binding = new Binding("MyRibbonGroupVariant") { Source = TheDataContextOfTheGroup, Mode = BindingMode.OneWayToSource };
    ribbonGroup.SetBinding(RadRibbonGroup.VariantProperty, binding);
  • Is there a way to change the icon of the group when collapsed?
    Yes, you can do that via the Icon property of the RadRibbonGroup element.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Inger Marie
Top achievements
Rank 1
answered on 09 May 2017, 02:01 PM

Yes, RadRibbonView :-)

 

I was hoping for an easy binding to RadCollapsiblePanel - and a way to do this in XAML. But thanks for the code example - it works which is the most important.

 

Also thanks for pointing me to Icon-property.

Tags
RibbonView and RibbonWindow
Asked by
Inger Marie
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Inger Marie
Top achievements
Rank 1
Share this question
or