We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the editor built-in slider for custom functions?

Thread ID:

Created:

Updated:

Platform:

Replies:

146473 Aug 5,2019 02:47 PM UTC Aug 6,2019 11:24 AM UTC Xamarin.Forms 1
loading
Tags: SfImageEditor
Marco Negroni
Asked On August 5, 2019 02:47 PM UTC

Good afternoon, i'm developing a software that uses SfImageEditor, i'm developing custom functions and i need a slider in order to make an image threshold filter.

There is a way to use the editor built-in slider? (i mean the slider that appears when you need to change the pencil size or transparency)

Thanks in advance

Rachel A [Syncfusion]
Replied On August 6, 2019 11:24 AM UTC

Hi Marco, 
 
Greetings from Syncfusion. 
 
We are not able to change the default functionality of toolbar’s built in slider. We would like to inform that, the ImageEditor having support for adding custom ToolBarItem (it does not have support to add custom views like button, slider, etc). So, you can achieve your requirement by adding custom toolbar item in footer toolbar, adding slider at the bottom of the image editor and control its visibility from the custom toolbar item. Please find the code snippet below 
 
[XAML]: 
 
<imageeditor:SfImageEditor.ToolbarSettings> 
    <imageeditor:ToolbarSettings ToolbarItemSelected="ToolbarSettings_ToolbarItemSelected"> 
        <imageeditor:ToolbarSettings.ToolbarItems> 
            <imageeditor:FooterToolbarItem Name="threshold" Icon="SendBack.png" /> 
        </imageeditor:ToolbarSettings.ToolbarItems> 
    </imageeditor:ToolbarSettings> 
</imageeditor:SfImageEditor.ToolbarSettings> 
 
 
[C#]: 
 
private void ToolbarSettings_ToolbarItemSelected(object sender, ToolbarItemSelectedEventArgs e) 
{ 
    var footertoolBar = e.ToolbarItem; 
    if (footertoolBar != null) 
    { 
        if (footertoolBar.Name == "threshold") 
        { 
            this.ThresholdFilterSlider.IsVisible = !this.ThresholdFilterSlider.IsVisible; 
        } 
    } 
} 
 
private void ThresholdFilterSlider_ValueChanged(object sender, ValueChangedEventArgs e) 
{ 
    // Your action here. 
} 
 
 
Please find the sample from the below link. 
 
For more information about toolbar customization. Please refer the below User Guide link. 
 
Regards, 
Rachel. 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon