Hi Jaloliddin,
Regarding “hide Open and
Save buttons”:
Your requirement to hide the Open and Save icons can be
achieved using the custom SfImageEditor and overriding the OnApplyTemplate()
method, where you can hide the hide/disable the toolbar items of your need.
[XAML]:
|
<local:CustomEditor
x:Name="editor"
ImageSource="Assets/Buildingimage.jpg"/>
|
[C#]:
|
public class CustomEditor
: SfImageEditor
{
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
var border = this.Template.FindName("PART_HeaderToolbarPanel",
this) as Border;
var panel = (border.Child as Grid).Children[0]
as StackPanel;
var browseButton = panel.Children[0] as
Button;
var saveButton = panel.Children[1] as
Button;
var line = panel.Children[2] as Rectangle;
browseButton.Visibility = Visibility.Collapsed;
saveButton.Visibility = Visibility.Collapsed;
line.Visibility = Visibility.Collapsed;
}
}
|
We have prepared an example
sample illustrating the above approach and have attached it below for your
reference. Please check the sample and let us know whether your requirement is
achieved.
We have already published a
Knowledge Base article on how to keep only the default toolbar items in WPF
SfImageEditor control: How
to keep only the default toolbar items in WPF SfImageEditor?.
We hope that this helps you. Please let us know if you
need further assistance.
Regards,
Vishal O.
Attachment:
WpfImageEditor_e512df5d.zip