Text not visible in DropDown

5 posts, 0 answers
  1. jmdion
    jmdion avatar
    4 posts
    Member since:
    Jul 2009

    Posted 06 Apr 2013 Link to this post

    My AutoCompleteBox seems to work correctly except that the text does not display properly in the DropDown (pls. see screen capture attached).

    I am new to WPF controls and I am wondering if this is because the application is a VSTO add-in. This is the container hierarchy:
    • AutoCompleteBox is in a WPF UserControl
    • WPF UserControl is in an ElementHost
    • ElementHost is in a WinForms UserControl
    • WinForms UserControl is in a Microsoft.Office.Tools.CustomTaskPane

    J.
  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 09 Apr 2013 Link to this post

    Hello Jean,

    The issue occurs because Expression Blend is losing ItemsSource property of the RadListBox element when the template has been generated. Please add ItemsSource="{TemplateBinding FilteredItems}" to the RadListBox named PART_ListBox inside the control template of AutoCompleteBox and the drop down content will be shown.

    I hope it helps.

    Regards,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. jmdion
    jmdion avatar
    4 posts
    Member since:
    Jul 2009

    Posted 09 Apr 2013 Link to this post

    Hello Maria,

    I cannot follow your suggestion because I am not using Blend.

    I think this may be a general WPF problem, not specific to the Telerik control. I will do some experiments with Microsoft controls and I will report back.

    Thanks.
    J.

  5. jmdion
    jmdion avatar
    4 posts
    Member since:
    Jul 2009

    Posted 11 Apr 2013 Link to this post

    I would like to close or remove this thread. I have started an online course on WPF and it will be a few weeks before I re-try to solve the original problem.

    Thanks again.
    J.
  6. jmdion
    jmdion avatar
    4 posts
    Member since:
    Jul 2009

    Posted 14 Apr 2013 Link to this post

    Problem solved!

    The members of my data type were fields while they should have been properties.

    In the debugging output I had this:

    System.Windows.Data Error: 40 : BindingExpression path error: 'Name' property not found on 'object' ''Company'


    I changed the members to properties and now the values are visible in the dropdown.

    J.
Back to Top
UI for WPF is Visual Studio 2017 Ready