BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
public Form1()
{
InitializeComponent();
//Adds items to the TreeNavigator.
treeNavigator.Header.HeaderText = "This PC";
TreeMenuItem treemenuitem1 = new TreeMenuItem();
treeNavigator.Items.Add(treemenuitem1);
treemenuitem1.Text = "Desktop";
TreeMenuItem treemenuitem2 = new TreeMenuItem();
treeNavigator.Items.Add(treemenuitem2);
treemenuitem2.Text = "Document";
TreeMenuItem treemenuitem3 = new TreeMenuItem();
treeNavigator.Items.Add(treemenuitem3);
treemenuitem3.Enabled = false;
treemenuitem3.ItemBackColor = Color.LightGray;
treemenuitem3.Text = "Downloads";
} |
<Grid>
<navigation:SfTreeNavigator Header="Enterprise Toolkit" Margin="0,0,540,0">
<navigation:SfTreeNavigatorItem Header="WinRT (XAML)" >
<navigation:SfTreeNavigatorItem Header="Chart"/>
<navigation:SfTreeNavigatorItem Header="Tools"/>
</navigation:SfTreeNavigatorItem>
<navigation:SfTreeNavigatorItem Header="Metro Studio" IsEnabled="False"/>
</navigation:SfTreeNavigator>
</Grid> |
<Grid>
<navigation:SfTreeNavigator ItemsSource="{Binding Models}"
Header="Enterprise Toolkit"
Width="300" Height="400"
HorizontalAlignment="Center"
VerticalAlignment="Center" >
<navigation:SfTreeNavigator.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Models}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Header}"
VerticalAlignment="Center" Margin="18 0 0 0"/>
</StackPanel>
</HierarchicalDataTemplate>
</navigation:SfTreeNavigator.ItemTemplate>
<navigation:SfTreeNavigator.ItemContainerStyle>
<Style TargetType="{x:Type navigation:SfTreeNavigatorItem}">
<Setter Property="IsEnabled" Value="{Binding IsEnable}"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="LightGray"/>
</Trigger>
</Style.Triggers>
</Style>
</navigation:SfTreeNavigator.ItemContainerStyle>
</navigation:SfTreeNavigator>
</Grid> |
Hi
Mariusz,
Thank
you for your patience.
We
have fixed the reported behavior “On applying the style for SfTreeNavigatorItem, it overrides
the applied theme” with
SfTreeNavigator and patch for the same can be downloaded from following
links.
Recommended
approach - exe will perform automatic configuration.
Please
find the patch setup from below location:
Assemblies
Link: https://syncfusion.com/Installs/support/patch/18.4.0.30/613278/F153051/SyncfusionPatch_18.4.0.30_613278_3232021011155878_F153051.zip
Assembly
Version: 18.4.0.30
Installation
Directions:
This
patch should replace the files "Syncfusion.SfTreeNavigator.WPF” under the
following folder.
$system
drive:\ Files\Syncfusion\Essential Studio\$Version #
\precompiledassemblies\$Version#\[TargetFramework]
Eg
: $system drive:\Program Files\Syncfusion\Essential
Studio\18.4.0.30\precompiledassemblies\18.4.0.30\4.6
To
automatically run the Assembly Manager, please check the Run assembly manager
checkbox option while installing the patch. If this option is unchecked, the
patch will replace the assemblies in precompiled assemblies’ folder only. Then,
you must manually copy and paste them to the preferred location or you must run
the Syncfusion Assembly Manager application (available from the Syncfusion
Dashboard, installed as a shortcut in the Application menu) to re-install
assemblies.
https://www.syncfusion.com/support/directtrac/patches
Please
try this patch and let us know if it is resolved at your end.
Feedback
Link: https://www.syncfusion.com/feedback/23225/background-does-not-applied-properly-on-setting-the-style-for-sftreenavigatoritem
Regards,
Vijayalakshmi
VR