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.
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.