5 Answers, 1 is accepted
Unfortunately, currently, the only possible solution to have different look for IsReadOnly or Disabled state is to set custom style per every control, modify its control template and change the value in its ReadOnly / Disabled visual state.
I've created a demo project where is demonstrated how to do this for RadComboBox. Please note the project uses implicit styles approach and NoXaml binaries.
I hope this helps.
I downloaded your project and did not see any styles for control template. Can you please post the code here.?
Can you check inside the Resources folder, the file is called CommonStyles.xaml. Also it is merged in App.xaml file among other resource dictionaries. This way you will keep styles in separated resource dictionaries.
Please let me know do you find the styles? If you still have problems I'll paste them in this forum post.
I checked that and I understand that is the straight forward solution. I am using two themes, Visual Studio and Expression Dark themes and user can change it by their interests. In this case, it wont work I guess.
I tried to change to bold and fore color but still it is not working because It was masked on top of the control. All I need to do is more transparent for that mask. How can I reduce transparency ?
It is difficult for me to download the zip files in my office. Can you please keep the solution here ?
When you switch themes run-time you need to have two separate resource dictionaries with custom styles for each theme and merge the corresponding resource dictionary when the theme is changed. You need to merge resource dictionaries in code behind as follow:
You can find below the NonEditable and EditableComboBox control template for VisualStudio2013 theme, which you need to place in a separate resource dictionary. Inside it you need play with the VisualState named Disabled in order to modify the transparency of the control. Also you need to apply the desired modification in both resource dictionaries : For ExpressionDark and VisualStudio2103 themes.
I hope it helps.