Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically launch a button's flyout

I am generating buttons in my app in C# and when the button is generated and the flyout properties are set for that button I want to launch the flyout. I can't find any way to simulate a click on the button in winRT, nor any methods for actually showing the flyout. Is there a way to do this?

When I talk about flyouts I am talking about these: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.flyout.aspx

Not settings flyouts.

like image 579
Alex Avatar asked Nov 01 '13 12:11

Alex


1 Answers

There's a ShowAt method on the Flyout class...

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.primitives.flyoutbase.showat.aspx

Or a static method ShowAttachedFlyout to use on the Button itself

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.primitives.flyoutbase.showattachedflyout.aspx

like image 76
Duncan Watts Avatar answered Nov 20 '22 22:11

Duncan Watts