Skip to content

DOCINFRA-2341_merged_using_automation #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions wpf/Breadcrumb/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ To add the control manually in XAML, follow the given steps:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
x:Class="HierarchicalNavigatorSample.MainWindow"
Title="HierarchicalNavigator Sample" Height="350" Width="525">
x:Class="HierarchyNavigatorSample.MainWindow"
Title="HierarchyNavigator Sample" Height="350" Width="525">
<Grid>
<!--Adding HierarchicalNavigator control -->
<syncfusion:HierarchicalNavigator x:Name="hierarchicalNavigator" Width="100" Height="100" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<!--Adding HierarchyNavigator control -->
<syncfusion:HierarchyNavigator x:Name="hierarchyNavigator" Width="100" Height="100" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Grid>
</Window>
{% endhighlight %}
Expand All @@ -75,7 +75,7 @@ To add the control manually in C#, follow the given steps:
{% tabs %}
{% highlight C# %}
using Syncfusion.Windows.Tools;
namespace HierarchicalNavigatorSample
namespace HierarchyNavigatorSample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
Expand All @@ -85,10 +85,10 @@ namespace HierarchicalNavigatorSample
public MainWindow()
{
InitializeComponent();
//Creating an instance of HierarchicalNavigator control
HierarchicalNavigator hierarchicalNavigator = new HierarchicalNavigator();
//Adding HierarchicalNavigator as window content
this.Content = hierarchicalNavigator;
//Creating an instance of HierarchyNavigator control
HierarchyNavigator hierarchyNavigator = new HierarchyNavigator();
//Adding HierarchyNavigator as window content
this.Content = hierarchyNavigator;
}
}
}
Expand All @@ -97,7 +97,7 @@ namespace HierarchicalNavigatorSample
{% endcapture %}
{{ codesnippet2 | OrderList_Indent_Level_1 }}

![wpf hierarchical navigator control added by code](Getting-Started_images/wpf-hierarchy-navigator-control-added-manually.png)
![wpf hierarchy navigator control added by code](Getting-Started_images/wpf-hierarchy-navigator-control-added-manually.png)

## Add items using HierarchyNavigatorItem

Expand Down
190 changes: 110 additions & 80 deletions wpf/Menu/Command-Binding-and-Command-Target-Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,92 +24,122 @@ To use the Command Binding support in an application users have to create a Dele
{% tabs %}
{% highlight xaml %}

<shared:MenuAdv x:Name="Menu">
<shared:MenuItemAdv Header="File">
<shared:MenuItemAdv Header="New">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo;component/Images/NewIcon.jpg" />
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
<shared:MenuItemAdv Command="Copy" CommandTarget="{Binding ElementName=textbox}">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo;component/Images/CopyIcon.jpg" />
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
<shared:MenuItemAdv Command="Cut" CommandTarget="{Binding ElementName=textbox}">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo;component/Images/CutIcon.jpg" />
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
</shared:MenuItemAdv>
<shared:MenuItemAdv Header="Edit" />
<shared:MenuItemAdv Header="View" />
<shared:MenuItemAdv Header="Themes">
<shared:MenuItemAdv
IsCheckable="True"
Header="Default"
CheckIconType="RadioButton"
GroupName="Themes"
IsChecked="True"
CommandParameter="Default"
Command="{Binding ElementName=root, Path=MyCommand}" />
<shared:MenuItemAdv
IsCheckable="True"
Header="Blend"
CheckIconType="RadioButton"
GroupName="Themes"
IsChecked="False"
CommandParameter="Blend"
Command="{Binding ElementName=root, Path=MyCommand}" />
<shared:MenuItemAdv
IsCheckable="True"
Header="Vs2010"
CheckIconType="RadioButton"
GroupName="Themes"
IsChecked="False"
CommandParameter="Vs2010"
Command="{Binding ElementName=root, Path=MyCommand}" />
</shared:MenuItemAdv>
</shared:MenuAdv>

<TextBox x:Name="textbox" />

<shared:MenuAdv x:Name="Menu">
<shared:MenuItemAdv Header="File">
<shared:MenuItemAdv Header="New">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo; component/Images/NewIcon.jpg"/>
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
<shared:MenuItemAdv Command="Copy" CommandTarget="{Binding ElementName=textbox}">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo; component/Images/CopyIcon.jpg"/>
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
<shared:MenuItemAdv Command="Cut" CommandTarget="{Binding ElementName=textbox}">
<shared:MenuItemAdv.Icon>
<Image Source="/MenuControlDemo; component/Images/CutIcon.jpg"/>
</shared:MenuItemAdv.Icon>
</shared:MenuItemAdv>
</shared:MenuItemAdv>
<shared:MenuItemAdv Header="Edit"/>
<shared:MenuItemAdv Header="View"/>
<shared:MenuItemAdv Header="Themes">
<shared:MenuItemAdv IsCheckable="True" Header="Default" CheckIconType="RadioButton" GroupName="Themes" IsChecked="True" CommandParameter="Default" Command="{Binding ElementName=root, Path=MyCommand}"/>
<shared:MenuItemAdv IsCheckable="True" Header="Blend" CheckIconType="RadioButton" GroupName="Themes" IsChecked="False" CommandParameter="Blend" Command="{Binding ElementName=root, Path=MyCommand}"/>
<shared:MenuItemAdv IsCheckable="True" Header="Vs2010" CheckIconType="RadioButton" GroupName="Themes" IsChecked="False" CommandParameter="Vs2010" Command="{Binding ElementName=root, Path=MyCommand}"/>
</shared:MenuItemAdv></shared:MenuAdv><TextBox x:Name="textbox"/>
{% endhighlight %}

{% highlight C# %}


public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
}
private DelegateCommand myCommand;
public DelegateCommand MyCommand
{
get
{
if (myCommand == null)
{
myCommand = new DelegateCommand(ApplyTheme);
}
return myCommand;
}
}
private void ApplyTheme(object visualStyle)
{
SkinManager.SetVisualStyle(this,(Syncfusion.Windows.Controls.Theming.VisualStyle)(visualStyle));
}
}



public class DelegateCommand : ICommand
{
public event EventHandler CanExecuteChanged;
readonly Predicate<Object> _canExecute = null;
readonly Action<Object> _executeAction = null;
public DelegateCommand(Action<object> executeAction, Predicate<Object> canExecute)
{
_executeAction = executeAction;
_canExecute = canExecute;
}
public DelegateCommand(Action<object> executeAction) : this(executeAction, null)
{
_executeAction = executeAction;
}
public void UpdateCanExecute()
{
if (CanExecuteChanged != null)
CanExecuteChanged(this, new EventArgs());
}
public bool CanExecute(object parameter)
{
return _canExecute == null || _canExecute(parameter);
} public void Execute(object parameter)
{
if (_executeAction != null)
_executeAction(parameter);
UpdateCanExecute();
}
}
{
public MainPage()
{
InitializeComponent();
}

private DelegateCommand myCommand;

public DelegateCommand MyCommand
{
get
{
if (myCommand == null)
{
myCommand = new DelegateCommand(ApplyTheme);
}
return myCommand;
}
}

private void ApplyTheme(object visualStyle)
{
SkinManager.SetVisualStyle(this, (Syncfusion.Windows.Controls.Theming.VisualStyle)(visualStyle));
}
}

public class DelegateCommand : ICommand
{
public event EventHandler CanExecuteChanged;

private readonly Predicate<object> _canExecute;
private readonly Action<object> _executeAction;

public DelegateCommand(Action<object> executeAction, Predicate<object> canExecute)
{
_executeAction = executeAction;
_canExecute = canExecute;
}

public DelegateCommand(Action<object> executeAction)
: this(executeAction, null)
{
}

public void UpdateCanExecute()
{
CanExecuteChanged?.Invoke(this, new EventArgs());
}

public bool CanExecute(object parameter)
{
return _canExecute == null || _canExecute(parameter);
}

public void Execute(object parameter)
{
_executeAction?.Invoke(parameter);
UpdateCanExecute();
}
}

{% endhighlight %}
{% endtabs %}

Expand Down
2 changes: 2 additions & 0 deletions wpf/Menu/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ You can display image on left of the [MenuItemAdv](https://help.syncfusion.com/c

{% endhighlight %}

{% highlight C# %}

string path;
path = Path.GetFullPath(@"../../" +"NewIcon.png");
Expand Down Expand Up @@ -272,6 +273,7 @@ menuAdv.Items.Add(Edit);
menuAdv.Items.Add(View);
menuAdv.Items.Add(Project);

{% endhighlight %}
{% endtabs %}

![Icons in WPF MenuAdv](getting-started_images/wpf-menu-icons.png)
Expand Down