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

radcombobox width

4 Answers 227 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
ابو
Top achievements
Rank 1
ابو asked on 01 Nov 2016, 06:13 PM

hi my friend

how I can change with of radcombobox depend on it's selection value  with nice animation

like changing in your wpf demo search textbox when we start change it's width resizable

4 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 03 Nov 2016, 09:21 AM
Hello,

Please, check the attached sample project that demonstrates how to make RadComboBox's Width behave as the search TextBox in our WPF Demos.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
0
ابو
Top achievements
Rank 1
answered on 03 Nov 2016, 07:36 PM

thank's Nasko

but I want to run trigger when selected combobox value changed like

if I select "select all" change the width of combobox else

back to the same saize

0
Nasko
Telerik team
answered on 04 Nov 2016, 08:49 AM
Hi,

What we could suggest you is to consider using the SelectionChanged event of RadComboBox. Inside the event you could get the Width of the Text of the ComboBox and change the Width of the control as desired:
private void PART_ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    var combo = sender as RadComboBox;
    if (combo != null)
    {
        //change ComboBox widht using the desired measures
        if (combo.Text.Length > 50)
        {
            //combo.Width =
        }
    }
}

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
0
ابو
Top achievements
Rank 1
answered on 09 Nov 2016, 06:14 PM
thanks
Tags
ComboBox
Asked by
ابو
Top achievements
Rank 1
Answers by
Nasko
Telerik team
ابو
Top achievements
Rank 1
Share this question
or