Thread is closed for posting
2 posts, 0 answers
  1. gisela
    gisela avatar
    15 posts
    Member since:
    Feb 2006

    Posted 13 Dec 2015 Link to this post

    Hi Telerik Team,

    i want change the selection color of the AutoCompletebox.

    If i set

    <SolidColorBrush x:Key="TextSelectionHighlightColorThemeBrush" Color="#FFCCCCCC"/>

    the selected string of the Windows Default TextBox has this color.

    What i have to do for the AutocompleteBox?


    Still another question:

    I habe found an example to change the "TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush".  The example works fine, but when i use the same xaml-file in my Project, and set in the App.xaml file:

    "<telerik:UserThemeResources x:Key="ThemeResource" DarkResourcesPath="ms-appx:///Themes/Dark.xaml" LightResourcesPath="ms-appx:///Themes/Light.xaml"/>",

    the TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush does not change.

    Any Idea?


    Thanks in advance


  2. Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1246 posts

    Posted 16 Dec 2015 Link to this post

    Hi Gisela,

    I tried following the steps described in this article and the code works as expected. I successfully changed the "TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush" brush with my own. All I had to do is to create the following ResourceDictionary in my App.xaml file:

    <Application x:Class="WU_Autocomplete.App"
                <telerik:UserThemeResources x:Key="MyResources"
                                            DarkResourcesPath="ms-appx:///Assets/MyResourcesDark.xaml" />
    Next step is to create the "MyResourcesDark" resource dictionary holding all named brushes.

        <SolidColorBrush Color="Green"
                         x:Key="TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush" />
    Please bare in mind that I defined it in the Assets folder of each project and set its BuildAction to Page. The last step of this approach is to force the RadAutocompleteBox to use the DarkTheme.This can be done from code like this:

    this.radAutoCompleteBox.RequestedTheme = ElementTheme.Dark;
    Please try out this approach and let us know if you need any further assistance.

    Pavel R. Pavlov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top