c# - Show/hide Mahapps Flyout control -
how can show/hide mahapps flyout control? have:
<controls:flyoutscontrol> <controls:flyout header="flyout" position="right" width="200" isopen="true"> <textblock fontsize="24">hello world</textblock> </controls:flyout> </controls:flyoutscontrol>
and it's open, when click button arrow can't show again.
you can use this:
yourmahappflyout.isopen = true;
also can bind flyout visibility windowcommand
(leftwindowcommand
/rightwindowcommand
) whenever close flyout can reopen using togglebutton
(for example) top of window.
<controls:metrowindow.flyouts> <controls:flyoutscontrol> <controls:flyout x:name="yourmahappflyout"/> <controls:flyoutscontrol> <controls:metrowindow.flyouts> <controls:metrowindow.rightwindowcommands> <controls:windowcommands> <togglebutton content="layers" ischecked="{binding elementname=yourmahappflyout, path=isopen}" cursor="hand"/> </controls:windowcommands> </controls:metrowindow.rightwindowcommands>
Comments
Post a Comment