How to apply theme to native control which has custom style?

Dear support


From the documentation I do not understand how to apply themes to Native Controls. Currently the theming works on Syncfusion controls, but not on the native controls. What I have to do, to apply the theme also on native controls.


Border has a Custom Style. It is not a syncfusion control, so what has it to be based on?

<Style TargetType="Border" BasedOn="{StaticResource ???}">
<Setter Property="Background" Value="GhostWhite" />
<Setter Property="BorderBrush" Value="Silver" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="2" />
</Style>


<Border Grid.Column="0" Grid.Row="1">
<ListView x:Name="BodyDocsListView"
SelectionMode="Single"
ItemsSource="{Binding BodyDocs}"
SelectedItem="{Binding SelectedBodyDoc}"
SelectionChanged="BodyDocsListView_OnSelectionChanged"
MouseDoubleClick="BodyDocsListView_OnMouseDoubleClick">
<ListView.View>
<GridView>
<GridViewColumn Width="{Binding ElementName=BodyDocsListView, Path=ActualWidth}"
DisplayMemberBinding="{Binding Title}" />
</GridView>
</ListView.View>
</ListView>
</Border>

2 Replies 1 reply marked as answer

SA Sulthan Amanu Syncfusion Team May 25, 2022 01:28 AM UTC

Hi Patrick,


We will validate the reported query and update the complete details on 25 May, 2022.


Regards,

Sulthan Amanu



SA Sulthan Amanu Syncfusion Team May 25, 2022 05:24 AM UTC

Hi Patrick,


We have prepared a demo based on the code snippet you have provided. In this demo, we have applied the material light theme to the window which has Border and ListView control and for the border, we have applied style in the window’s Resources.


Here ListView is applied with the given theme and Border reflects the style which has been provided in Resources.

Can you check this demo and share more details about your requirement?


Regards,

Sulthan Amanu


Attachment: Native_Control_17db332b.zip

Marked as answer
Loader.
Up arrow icon