How do I set the background on a XamDataCard?
Hello Darlo,
In order to change the background of the XamDataCards you can use the Background property and set it to some color: Background="Azure". If you want to change the color of the DataRecordCellArea in the CardViewCard items of the XamDataCards you can set a style:
<Style TargetType="{x:Type igDP:DataRecordCellArea}">
<Setter Property="Background" Value="Yellow"/>
</Style>
Please let me know if you have any questions on the matter.
This does not work. It wasn't the DataRecordCellArea background I needed to change, I wanted to change the background of the entire control. I was able to achieve it by doing this.
<SolidColorBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, CardBackground}" PresentationOptions:Freeze="true" Color="Blue"/>
Thanks for your help.
Thank you for your response. I believe that other community members may benefit from this.
I don't want default header in the xam data card. Can we do it?
Also one field is Boolean type (check box), i am showing it as "string" value (yes and no) using BooleanToString converter, now the problem is the theme style is not applied on this field.
Hello Rachita,
Thank you for your feedback. I am glad that you resolved your issue.
If you have any other questions, please do not hesitate to ask.
It worked thanks :)
When you use a theme, the style for the theme is applied over all other styles and this is the reason why the alignment of the text is not changed if you use a style. In order to apply your custom style you could use its BasedOn property in order to show the values left aligned. Here is a code snippet where I use LunaOlive theme:
<Style TargetType="{x:Type editors:XamNumericEditor}" BasedOn="{x:Static igThemes:EditorsLunaNormal.XamNumericEditor}">
<Setter Property="HorizontalContentAlignment" Value="Left"/>
I attached a sample project demonstrating this. If you have any other questions, please do not hesitate to ask.
Actually i am using theme in xamdatacard, thats why other styles are not working, if i do not use any theme , i am able to show decimal values left align.
By Default decimal values are right align in xamdatacard and text values are left align. I need to show all control either left or right.
I want to change the alignment of decimal values to left. Please help i am not able to do.