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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfBackdropPage Icon

Thread ID:

Created:

Updated:

Platform:

Replies:

141702 Dec 28,2018 03:06 PM UTC Mar 11,2019 09:28 AM UTC Xamarin.Forms 3
loading
Tags: SfBackdropPage
Aaron Khan
Asked On December 28, 2018 03:06 PM UTC

Is it possible to change the hamburger icon that reveals the backlayer to another icon?

Michael Prabhu M [Syncfusion]
Replied On December 31, 2018 08:45 AM UTC

Hi Aaron, 

Greetings from Syncfusion. 

Hamburger icon is added in the ToolbarItems of Page, so you can change the hamburger icon that reveals the backlayer by changing the Icon property of ToolbarItem at load time and in Clicked event of ToolbarItem. Please refer the below code snippets. 

Code snippets for changing hamburger icon at load time: 
public BackdropSample() 
{ 
    InitializeComponent(); 
    // add the below code to change the hamburger icon in load time 
    var toolbarItem = ToolbarItems[0]; 
    // Note: hamburger icon will be displayed only when IsBackLayerRevealed is set as false, by default it is false. 
    toolbarItem.Icon = "icon.png"; // to change the hamburger icon  
    toolbarItem.Clicked += OnToolbarItemClicked; 
} 
 

Code snippets for changing hamburger icon on clicking ToolbarItem: 
private void OnToolbarItemClicked(object sender, EventArgs e) 
{ 
    if (this.IsBackLayerRevealed) 
    { 
        // to change the close icon. 
    } 
    else 
    { 
        // to change the hamburger icon 
        (sender as ToolbarItem).Icon = "icon.png"; 
    } 
} 
 

Sample: BackdropSample 
 
Note: We would like to let you know that we have planned to provide direct support for this and it will be available in our upcoming Vol 1 2019 release which is scheduled to be rolled out at mid of March 2019.   

Please let us know if you need any further assistance. 

Regards, 
Michael 


Muhammad Aftab Amjad
Replied On March 10, 2019 10:29 AM UTC

Hi Aaron, 

Greetings from Syncfusion. 

Hamburger icon is added in the ToolbarItems of Page, so you can change the hamburger icon that reveals the backlayer by changing the Icon property of ToolbarItem at load time and in Clicked event of ToolbarItem. Please refer the below code snippets. 

Code snippets for changing hamburger icon at load time: 
public BackdropSample() 
{ 
    InitializeComponent(); 
    // add the below code to change the hamburger icon in load time 
    var toolbarItem = ToolbarItems[0]; 
    // Note: hamburger icon will be displayed only when IsBackLayerRevealed is set as false, by default it is false. 
    toolbarItem.Icon = "icon.png"; // to change the hamburger icon  
    toolbarItem.Clicked += OnToolbarItemClicked; 
} 
 

Code snippets for changing hamburger icon on clicking ToolbarItem: 
private void OnToolbarItemClicked(object sender, EventArgs e) 
{ 
    if (this.IsBackLayerRevealed) 
    { 
        // to change the close icon. 
    } 
    else 
    { 
        // to change the hamburger icon 
        (sender as ToolbarItem).Icon = "icon.png"; 
    } 
} 
 

Sample: BackdropSample 
 
Note: We would like to let you know that we have planned to provide direct support for this and it will be available in our upcoming Vol 1 2019 release which is scheduled to be rolled out at mid of March 2019.   

Please let us know if you need any further assistance. 

Regards, 
Michael 


Hi, I am in the same shoes as I have a white navigation bar and a white icon does not appear.  I also tried the provided solution but it works after the first trigger like I press the invisible icon then the event OnToolbarItemClicked works fine and icon changes to the provided one otherwise it remains invisible. The complete solution is also add the following code

protected override async void OnAppearing()
{
     var toolbarItem = ToolbarItems[0];
     toolbarItem.Icon = "more.png";
}

Bharathiraja K [Syncfusion]
Replied On March 11, 2019 09:28 AM UTC

Hi Muhammad, 
 
Thanks for your workaround. We have included this feature in our Volume1 release which will be available in the mid of March 2019. 
 
Regards, 
 Bharathi.

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.

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.

;