CardView - Setting Width Manually Causes Control to Lose Theme

Hello, 

I have a CardView which uses the following two StaticResources:

        <Style x:Key="CardViewItemStyle" TargetType="{x:Type syncfusion:CardViewItem}">

            <Setter Property="Header" Value="{Binding BeamID.IdealValue}"></Setter>

            <Setter Property="Width" Value="400"/>

        </Style>


        <Style x:Key="Style1" TargetType="{x:Type syncfusion:CardView}" >

            <Setter Property="ItemsPanel">

                <Setter.Value>

                    <ItemsPanelTemplate>

                        <syncfusion:CardViewPanel Orientation="{Binding Path=Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type syncfusion:CardView}}}" />

                    </ItemsPanelTemplate>

                </Setter.Value>

            </Setter>

        </Style>

The CardView

        <syncfusion:CardView SelectedItem="{Binding SelectedBeam, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Beams, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True}" Grid.Row="1" IsEditing="True" Style="{StaticResource Style1}" ItemContainerStyle="{StaticResource CardViewItemStyle}" ShowHeader="False" Orientation="Horizontal" IsEnabled="{Binding ProtocolLoaded}">

... CardView Contents ...        

</syncfusion:CardView>



This CardView does not show up in the MaterialDark Theme applied to the rest of the controls, Please let me know how to correct this. 

Cheers,

Jordan


3 Replies

SN Sudharsan Narayanan Syncfusion Team January 28, 2022 03:08 AM UTC

Hi Jonathan,

You can be able to achieve the “Setting Width Manually loses the Theme” requirement by using style based on theme in the sample. You can find the sample from the below link,

Sample: https://www.syncfusion.com/downloads/support/forum/172327/ze/CardViewIssue-1677142541

Please check the sample code and let us know your concerns. We are happy to assist you.

Regards,
Sudharsan



PC Palmira Case replied to Sudharsan Narayanan February 5, 2022 02:10 PM UTC

Hi Jonathan,

You can be able to achieve the “Setting Width Manually loses the Theme” requirement by using style based on theme in the sample. You can find the sample from the below link,

Sample: https://www.syncfusion.com/downloads/support/forum/172327/ze/CardViewIssue-1677142541io games

Please check the sample code and let us know your concerns. We are happy to assist you.

Regards,
Sudharsan


Thank you! Did it.



SN Sudharsan Narayanan Syncfusion Team February 7, 2022 12:37 PM UTC

Hi Palmira,

We are glad to know that your issue has been fixed. Please let us know if you need any other assistance. We are happy to assist you.

Regards,
Sudharsan


Loader.
Up arrow icon