How to Un-Bold the Selected Item

3 posts, 1 answers
  1. Greg
    Greg avatar
    35 posts
    Member since:
    Sep 2013

    Posted 09 Dec 2014 Link to this post

    Seemingly simple question... I have a RadComboBox that I want to display the selected item without the font being bold.

    The template being used:

    <UserControl.Resources>
      <DataTemplate x:Key="SelectionBoxTemplate">
        <TextBlock Text="{Binding Code}" FontWeight="Regular"/>
      </DataTemplate>
    </UserControl.Resources>

    The radcombobox:

    <telerik:RadComboBox x:Name="RegionComboBox"
                         Grid.Column="2"
                         Margin="2"
                         ClearSelectionButtonContent="Clear"
                         ClearSelectionButtonVisibility="Visible"
                         DisplayMemberPath="Code"
                         ItemsSource="{Binding Regions}"
                         SelectedValue="{Binding Region,
                                                 Mode=TwoWay}"
                         SelectedValuePath="Code"
                         SelectionBoxTemplate="{StaticResource SelectionBoxTemplate}"/>

    I can change the color of the displayed item, but I cannot get the font weight to be regular. It is always bold.

    Thanks.
  2. Answer
    Masha
    Admin
    Masha avatar
    355 posts

    Posted 10 Dec 2014 Link to this post

    Hi Greg,

    I guess you are using Windows8 theme, where the default FontFamily of RadComboBox is Segoe UI Semibold. This FontFamily  doesn't have Normal FontWeight that is why you cannot change it. I suggest you change the FontFamily of RadComboBox or the TextBlock of SelectionBoxTemplate to Segoe UI which is the same font but with Normal FontWeight.

    Hope this helps.

    Regards,
    Masha
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Greg
    Greg avatar
    35 posts
    Member since:
    Sep 2013

    Posted 10 Dec 2014 in reply to Masha Link to this post

    Thanks! That was the problem.
Back to Top