Clancey / FlyoutNavigation

Other
95 stars 87 forks source link

Get current node #72

Closed mohsad06 closed 9 years ago

mohsad06 commented 9 years ago

Hi,

thanks for this great component. quick question, how can I get the menu title for the current viewcontroller that I'm in?

for example:

string[] Headers = { "Contact Us", "Dashboard", "Money Transfer", };

navigation.NavigationRoot = new RootElement("Menu") { new Section ("Menu") { from page in Headers select new StringElement (page) as Element } };

and in Dashboard ViewController I wanna get this node text as "Dashboard"

Clancey commented 9 years ago

Sure. Use the SelectedIndexChanged action or just SelectedIndex and grab the right one from your array.

Sent from my iPhone

On Mar 4, 2015, at 5:15 AM, mohsad06 notifications@github.com wrote:

Hi,

thanks for this great component. quick question, how can I get the menu title for the current viewcontroller that I'm in?

for example:

string[] Headers = { "Contact Us", "Dashboard", "Money Transfer", };

navigation.NavigationRoot = new RootElement("Menu") { new Section ("Menu") { from page in Headers select new StringElement (page) as Element } };

and in Dashboard ViewController I wanna get this node text as "Dashboard"

— Reply to this email directly or view it on GitHub.

mohsad06 commented 9 years ago

Thanks man, that solved my problem, your component is great.