Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149328 | Nov 21,2019 10:14 PM UTC | Nov 22,2019 12:00 PM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfImageEditor |
…
<ContentPage.BindingContext>
<local:ImageModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<imageeditor:SfImageEditor x:Name="editor" Source="{Binding Image}"/>
</ContentPage.Content>
… |
…
public ImageEditorGettingStarted()
{
InitializeComponent();
editor.ToolbarSettings.ToolbarItems.Add(
new HeaderToolbarItem
{
Name = "CustomFlip",
Text = "Flip",
});
editor.ToolbarSettings.ToolbarItems.Add(
new HeaderToolbarItem
{
Name = "CustomRotate",
Text = "Rotate",
});
editor.ToolbarSettings.ToolbarItemSelected += ToolbarSettings_ToolbarItemSelected;
}
protected override void OnAppearing()
{
base.OnAppearing();
editor.SetToolbarItemVisibility("undo, redo, text,path, Shape, Transform, effects", false);
}
private void ToolbarSettings_ToolbarItemSelected(object sender, ToolbarItemSelectedEventArgs e)
{
string ItemName = e.ToolbarItem.Name;
if (ItemName == "CustomRotate")
{
editor.Rotate();
}
else if (ItemName == "CustomFlip")
{
editor.Flip(FlipDirection.Horizontal);
}
}
… |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.