BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
…
<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);
}
}
… |