Category / Section
How to disable toolbar menu?
1 min read
SfImageEditor allows you to Hide/Show the Toolbar.
Step 1: Create an image editor sample with all necessary assemblies.
Please refer the below link to create a simple SfImageEditor sample along with the ways to configure it.
https://help.syncfusion.com/xamarin/sfimageeditor/getting-started
Step 2: IsVisible property in ToolbarSettings is used to Hide/Show the Toolbar. Set IsVisible property as true to show the Toolbar, and set as false to Hide the Toolbar.
The following code snippet illustrates how to achieve this method.
Xaml:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:ImageEditor_GettingStarted" xmlns:imageeditor="clr- namespace:Syncfusion.SfImageEditor.XForms;assembly=Syncfusion.SfImageEditor.XForms" x:Class="ImageEditor_GettingStarted.MainPage"> <imageeditor:SfImageEditor Source="{Binding Image}" x:Name="sfimageEdtior"> <imageeditor:SfImageEditor.ToolbarSettings> <imageeditor:ToolbarSettings IsVisible="false" /> </imageeditor:SfImageEditor.ToolbarSettings> </imageeditor:SfImageEditor>
C#
public partial class MainPage : ContentPage { public MainPage() { InitializeComponent(); BindingContext = new ImageModel(); sfimageEdtior.ToolbarSettings.IsVisible = false; } }
Add model class to the sample
C#
class ImageModel { public ImageSource Image { get; set; } public ImageModel() { Image = ImageSource.FromResource("ImageEditor_GettingStarted.Image.jpg"); } }
Image property of the above ImageModel class bind to the Image editor Source property.
Sample Link:
Screenshot: