In xamDataGrid, can I get a column containing read-write properties to behave the same was as read-only properties do? I have set the field to be read-only, and whereas it's true that the value can't be edited, the field does appear differently when it has focus. This does not happen with fields based on read-only properties. Assuming it's relatively easy (i.e. without having to create templates for different states), how would I do that?
Thanks!
Brad.
Hello Brad,
Thank you for the feedback. I am glad, that you have found a solution to your issue.
Thanks for your help, but I have this working already. :)
I have been looking into your post.
Would you please provide me with a screenshot of the appearance you want to achieve for the XamDataGrids Field when the 'IsEnabled' property is set to false.
This way I would be able to further investigate this matter for you and provide you with further information on this matter.
Looking forward to hearing from you.
I should have been much more clear as to what I need. I know how to set the properties for a disabled field. What I don't know is what the properties are for a field that is read-only. I can guess that the background should be white, but maybe it's transparent, or maybe (more likely) it's a system color or something.
Thank you for the feedback.
Here is an example of the style, that can be set to change the appearance of the cells when the 'IsEnabled' property is set for a Field. In this style I create a trigger to set the desired properties only if the 'IsEnabled' property is set to 'False':
<Style TargetType="{x:Type igDP:CellValuePresenter}">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>
Please do not hesitate to let me know if you have any further questions on this matter.