New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display a flyout from a XAML UserControl #1620
Comments
You could put your flyout in your window then find it and display it. Window parentWindow = Window.GetWindow(this);
object obj = parentWindow.FindName("mainFlyout");
Flyout flyout = (Flyout) obj;
flyout.Content = new SomeFlyOutUserControl();
flyout.IsOpen = !flyout.IsOpen; |
The flyouts heavily depend on the hosting |
Just wanted to comment back that I was able to get this to work following AndySF's solution. |
I still think this should be a feature out of the box the need to use this control in a usercontrol is very common |
There should be an option to make Flyout behave like it's defined in the window |
I understand the solution provided to access the Flyout on the UserControl form the Parent. |
I am using MahApps Version 0.14.0.0
Is there a way to get the FlyoutsControl to work from within a xaml UserControl?
Take your MetroDemo Sample UI for an example.....you call usercontrols for each of your tab screens. (which is exactly what we do). The main functionality is contained within each exampleView Usercontrol. So getting the Flyout to work from here would be fantastic since the usercontrol is already "wrapped" by the MetroWindow.
If anyone has come up with a solution or even a hack to get the flyout control to work from the UserControl please paste a sample of what you did to get it to work.
The text was updated successfully, but these errors were encountered: