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;
} |
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";
}
} |
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 timevar 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 icontoolbarItem.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: BackdropSampleNote: 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