5 Answers, 1 is accepted
0
Hi Son,
The Foreground property will work only in an editable RadComboBox. In order to change the color of the text in non editable RadComboBox you need to set SelectionBoxItemTemplate. You can check this example for more info.
Greetings,
Boyan
the Telerik team
The Foreground property will work only in an editable RadComboBox. In order to change the color of the text in non editable RadComboBox you need to set SelectionBoxItemTemplate. You can check this example for more info.
Greetings,
Boyan
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Son
Top achievements
Rank 1
answered on 23 Sep 2011, 07:33 AM
<
DataTemplate
x:Key
=
"ComboBoxSimpleTemplate"
>
<
Grid
>
<
TextBlock
Foreground
=
"Red"
Text
=
"{Binding Name}"
/>
</
Grid
>
</
DataTemplate
>
If I use DataTemplate then I have to create one DataTemplate for each combobox. Because Text="{Binding Name}" depends on displayfield of that combobox.
Ex.
<
TextBlock
Foreground
=
"Red"
Text
=
"{Binding City}"
/>
<
TextBlock
Foreground
=
"Red"
Text
=
"{Binding Gender}"
/>
<
TextBlock
Foreground
=
"Red"
Text
=
"{Binding JobName}"
/>
0
Hi Son,
You can achieve this by editing the template of the RadCombobox and then find NonEditable ComboBox and then set the Foreground of
Then apply the style to all RadComboBoxes and set the binding for each of them in its XAML. I have attached the template of RadComboBox for Office_Black theme. You can get the templates of other themes from your installation. The path is this:
C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2011 SP1\Themes
Hope this works for you. Let me know if you need further help.
All the best,
Boyan
the Telerik team
You can achieve this by editing the template of the RadCombobox and then find NonEditable ComboBox and then set the Foreground of
<
telerik:RadToggleButton
x:Name
=
"PART_DropDownButton"
IsTabStop
=
"False"
Margin
=
"0"
Padding
=
"0"
ClickMode
=
"Press"
telerik:StyleManager.Theme
=
"{StaticResource Theme}"
>
Then apply the style to all RadComboBoxes and set the binding for each of them in its XAML. I have attached the template of RadComboBox for Office_Black theme. You can get the templates of other themes from your installation. The path is this:
C:\Program Files (x86)\Telerik\RadControls for Silverlight Q2 2011 SP1\Themes
Hope this works for you. Let me know if you need further help.
All the best,
Boyan
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Son
Top achievements
Rank 1
answered on 29 Sep 2011, 08:42 AM
Thank you Boyan
Can you make it clear ? How can I edit the template of the RadCombobox and change the foreground in code behind ?
Thanks
Can you make it clear ? How can I edit the template of the RadCombobox and change the foreground in code behind ?
Thanks
0
Hello Son,
This issue will be fixed with the internal build next week. You will be able to set the foreground of a non editable ComboBox through the Foreground property.
Sorry for the caused inconvenience.
Best wishes,
Konstantina
the Telerik team
This issue will be fixed with the internal build next week. You will be able to set the foreground of a non editable ComboBox through the Foreground property.
Sorry for the caused inconvenience.
Best wishes,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>