RadComboBox problem when trying to create a template

2 posts, 1 answers
  1. Stephen
    Stephen avatar
    43 posts
    Member since:
    Apr 2012

    Posted 28 Nov 2012 Link to this post

    When I right click on a radcombobox and choose Edit a Copy, it doesn't show me the whole template for the box.  All I see is this:

    <ControlTemplate x:Key="RadComboBoxControlTemplate1"
                         TargetType="telerik:RadComboBox" />

    What I want to do is to put something like this into my Design Dictionary:

    <Style x:Name="RadComboBoxTest"
               TargetType="telerik:RadComboBox">
            <Setter Property="CanAutocompleteSelectItems"
                    Value="True" />
            <Setter Property="CanKeyboardNavigationSelectItems"
                    Value="True" />
            <Setter Property="IsEditable"
                    Value="True" />
            <Setter Property="IsReadOnly"
                    Value="True" />
            <Setter Property="OpenDropDownOnFocus"
                    Value="True" />
            <Setter Property="TextSearchMode"
                    Value="StartsWith" />
            <Setter Property="ClearSelectionButtonVisibility"
                    Value="Visible" />
            <Setter Property="ClearSelectionButtonContent"
                    Value="Clear" />
        </Style>

    I am probably not doing this right, but I need to make these values preset, so all of our RadComboBox controls can be standardized and reference the Template.
  2. Answer
    Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 03 Dec 2012 Link to this post

    Hi Stephen,

    Usually, the easiest way for templates customizations is to use Expression Blend to generate the needed templates and resources and then make your own customizations upon them. In Expression Blend open your Silverlight project, select RadComboBox in Objects and Timeline, right-click it and choose from the menu Edit Template-> Edit A Copy. Then Blend will generate all the necessary templates and resources and you can easily modify them. More information about customizing RadComboBox you could find in our online documentation. Keep in mind the visual state brushes come from the ButtonChrome control placed in a certain control template. And in most cases in order to customize how a control looks in a normal, mouse over or other state, the ButtonChrome should be styled.

    If you do not want to use Blend you can get the same Styles from RadControls installation folder on your machine. There you will find a Themes folder. Drill down to the xaml file that corresponds to the control and its theme and you will have all needed resources for customizing the control manually.

    Hope this is helpful.

    Kind regards,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top