Drawer Behaviour unaffected by Drawer Host OpenMode value #3185
-
Hello, i am learning WPF and currently developping a small desktop application. I had the need for a Side menu and that's why i looked into Material Design in XAML. My problem is that, no matter the value i assign to my Drawer host OpenMode property, it keeps pushing to the side everything else that's in my window, even though i set my value to Modal. Is this behaviour normal and did i skip a step? I've tried the demo built with WPF (MaterialDesignDemo.exe) and everything works fine in it, so i guess i'm the one that made an error. I've also looked at the DrawerHostOpenMode enum and every value there is set to 0 except Standard, is this normal? Here is my implementation of Drawer Host :
Thanks already for any support you might be able to provide me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Thomas-Giaroli I can see that you have Try placing your content directly in the <materialDesign:DrawerHost Name="MenuDrawerHost">
<materialDesign:DrawerHost.LeftDrawerContent>
<Button Name="ModalTestButton" Click="ModalTestButton_Click" Width="auto" Content="Clique"/>
</materialDesign:DrawerHost.LeftDrawerContent>
<!-- Place your "content" here -->
</materialDesign:DrawerHost> So basically nesting your content inside of the |
Beta Was this translation helpful? Give feedback.
@Thomas-Giaroli I can see that you have
Grid.Column=0
applied on theDrawerHost
which effectively puts the drawer host in the first column of a table defined higher up the visual tree. Where are you placing the content which is being pushed? In a different column in that same grid? That could be the issue.Try placing your content directly in the
DrawerHost
; something along these lines: