This question is locked. New answers and comments are not allowed.
I have an application that allows user can change style in administration setup. I am using SQL 2008 to save setting data.
How can I set dynamic style in code behind?
E.x Foreground: #000000 or #FF0000 or # FFFFFF ,
Please help me
How can I set dynamic style in code behind?
E.x Foreground: #000000 or #FF0000 or # FFFFFF ,
Please help me
12 Answers, 1 is accepted
0
Hi Son,
To change the Foreground of the Items in the ComboBox you need to set this property to each one of them. As for the selected item the property should be set to the ComboBox itself.
Hope this information helps.
Kind regards,
Konstantina
the Telerik team
To change the Foreground of the Items in the ComboBox you need to set this property to each one of them. As for the selected item the property should be set to the ComboBox itself.
Hope this information helps.
Kind regards,
Konstantina
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 22 Sep 2011, 09:19 AM
I still dont understand what you mean. I have many comboboxes in application with different itemsource.
Is there a best way to apply all comboboxes by using style ?
I tried the style with fontsize, fontweight, fontfamily. They work properly but not for foreground property.
Please help me with some code snippet
Is there a best way to apply all comboboxes by using style ?
I tried the style with fontsize, fontweight, fontfamily. They work properly but not for foreground property.
Please help me with some code snippet
0
Hello Son,
In that case you can create dynamically a style, in its setter set the Foreground property and apply it to the ComboBoxes as ItemsContainerStyle. Attached I am sending you a sample project in which this is illustrated.
Hope this helps.
Greetings,
Konstantina
the Telerik team
In that case you can create dynamically a style, in its setter set the Foreground property and apply it to the ComboBoxes as ItemsContainerStyle. Attached I am sending you a sample project in which this is illustrated.
Hope this helps.
Greetings,
Konstantina
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 27 Sep 2011, 04:14 AM
Hi Konstantina
I have read your attachment, it is the same way that I am doing on my project. With Non-Editable Combobox, the foreground property just apply for ItemContainer but not for selected item. In your example, I see the ItemContainer's foreground is purple but selectedItem is still black. I want all of them to be purple color. I haven't found the solution in this case yet.
Please help me again
Thanks
I have read your attachment, it is the same way that I am doing on my project. With Non-Editable Combobox, the foreground property just apply for ItemContainer but not for selected item. In your example, I see the ItemContainer's foreground is purple but selectedItem is still black. I want all of them to be purple color. I haven't found the solution in this case yet.
Please help me again
Thanks
0
Hi Son,
In order to set a foreground color also to the selected item, you need to set the Foreground property of the ComboBox itself.
All the best,
Konstantina
the Telerik team
In order to set a foreground color also to the selected item, you need to set the Foreground property of the ComboBox itself.
All the best,
Konstantina
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, 10:05 AM
Hi Konstantina
The Foreground property just apply for Editable-RadCombobox but not for Non-Editable RadCombobox. I am using Non-Editable RadCombobox.
Can you please check it again
Thanks
The Foreground property just apply for Editable-RadCombobox but not for Non-Editable RadCombobox. I am using Non-Editable RadCombobox.
Can you please check it again
Thanks
0
Hello Son,
Thank you for bringing this to our attention.
A fix will be provided in the next week's internal build.
Sorry for the caused inconvenience.
All the best,
Konstantina
the Telerik team
Thank you for bringing this to our attention.
A fix will be provided in the next week's internal build.
Sorry for the caused inconvenience.
All the best,
Konstantina
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 03 Oct 2011, 04:51 AM
Hi Konstantina
When you have new build. Can you please announce on this thread? And pointing me how can I apply that new build.
Thanks
When you have new build. Can you please announce on this thread? And pointing me how can I apply that new build.
Thanks
0
Hello Son,
The build will be available for download from your account on Monday. You can find more information how to upgrade the controls in this help article.
Please let us know if you experience any difficulties along the way.
Kind regards,
Konstantina
the Telerik team
The build will be available for download from your account on Monday. You can find more information how to upgrade the controls in this help article.
Please let us know if you experience any difficulties along the way.
Kind regards,
Konstantina
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 10 Oct 2011, 09:45 AM
Hi Konstantina
I didnt receive any internal builds in my account
Can you please check it ?
Thanks
I didnt receive any internal builds in my account
Can you please check it ?
Thanks
0
Accepted
Hi Son,
The internal build should be already ready for download under your account. Please log in and follow this link.
Please let us know how did that go.
Regards,
Konstantina
the Telerik team
The internal build should be already ready for download under your account. Please log in and follow this link.
Please let us know how did that go.
Regards,
Konstantina
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 11 Oct 2011, 03:12 PM
Hi Konstantina
I got it on today
Thank you very much
I got it on today
Thank you very much