close EdgeNavigator when leave page

so when i have the EdgeNavigator (sidebar in page1) open and navigate to page0 or page2 id like to close the EdgeNavigator, how can i do this?

<iOS.StatusBarConfig Style=“Light” />

		<StackPanel ux:Class="Hamburger" ItemSpacing="3" HitTestMode="LocalBounds" Width="56" Height="56" ContentAlignment="Center">
			<Each Count="3">
				<Rectangle Width="22" Height="2" Color="#fff" />

		<PageControl ux:Name="navigation" Active="page1">

		<Page ux:Name="page0" Background="#FAFDF9">
		<!-- close sidebar if open in page1 ? -->
		<Page ux:Name="page1">
			<EdgeNavigator ux:Name="TheSidebar">
				<Panel ux:Name="sidebar" Edge="Left" Width="100%" Margin="0,0,56,0" Background="#37474F">
					<Shadow ux:Name="shadow" Angle="180" Distance="8" Size="16" Color="#0000" />
						<Change shadow.Color="#0004" />
						<Change sidebarFade.Opacity="1" />
				<DockPanel Color="#263238">
					<Rectangle ux:Name="sidebarFade" Layer="Overlay" Color="#0005" Opacity="0" HitTestMode="None" />
					<StackPanel Dock="Top" Color="#2196F3">
						<Shadow Size="3" Distance="1" />
						<StatusBarBackground />
						<Panel Height="56">
							<Hamburger Alignment="Left">
									<NavigateToggle Target="sidebar" />
		<Page ux:Name="page2" Background="#FAFDF9">
		<!-- close sidebar if open in page1 ? -->


EdgeNavigator has a javascript dismiss() method (see docs)

You could add an animator that triggers when leaving Page1 and make that one call dismiss() on the edgenavigator.

okay so this closes the edgenavigator

	var Observable = require('FuseJS/Observable');

	function closeTest(){

	}, 5000);

    module.exports = {};

still not sure how to trigger the function closeTest from UX (leaving Page1 and make that one call)?

Place this inside Page1 (after making sure closeTest is also exported from the module)

	<Callback Handler="{closeTest}"/>

sweet :smiley: