radcombobox width

5 posts, 0 answers
  1. ابو
    ابو avatar
    14 posts
    Member since:
    Oct 2015

    Posted 01 Nov Link to this post

    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

  2. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 03 Nov Link to this post

    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!
  3. UI for WPF is Visual Studio 2017 Ready
  4. ابو
    ابو avatar
    14 posts
    Member since:
    Oct 2015

    Posted 03 Nov in reply to Nasko Link to this post

    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

  5. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 04 Nov Link to this post

    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!
  6. ابو
    ابو avatar
    14 posts
    Member since:
    Oct 2015

    Posted 09 Nov in reply to Nasko Link to this post

    thanks
Back to Top
UI for WPF is Visual Studio 2017 Ready