Targeted Click

I have a title bar at the top of my app, that looks like most iOS title bars, theres the title in the middle, a back button on the left and another action button on the right.

The back button navigates to different pages and does different things depending on the currently active page, all of my pages are in a PageControl.

Is it possible for me to do something like <Clicked Target="navButton" > Or do I have to make multiple back buttons and just fade them in and out depending on the page?


I don’t understand the question, sorry.

I take it you are not using a HeirarchicalNavigation here, you want to implement your own go-back logic.

Do you want the back button to do different things based on different active pages? Sounds like something you would like to control from JS then?

Let’s say theres a button and a back control:

<Button ux:Name="myButton"/>

    <Page ux:Name="Page1" />
    <Page ux:Name="Page2" />
    <Page ux:Name="Page3" />

The <Button> does different things depending on which page is currently active. Ideally I could do this:

<Page ux:Name="Page1" >
    <Clicked Target="myButton">
<Page />

But I can’t yet, so what’s the correct way to do it now?

The correct way to do business logic in JavaScript.

<PageControl Active="{activePage}">


<Button Clicked="{backButtonClicked}" />

And in JS, do different things in backButtonClicked based on the value of the activePage observable.

worked :slight_smile: