Materialdesigninxamltoolkit: Drawer open by code ?

Created on 16 Oct 2018  路  2Comments  路  Source: MaterialDesignInXAML/MaterialDesignInXamlToolkit

Is there any way to open drawer by code ?
I saw manual , but no description...
I want to open like this , like dialog..
but No open function.


            var drawerView = new DeviceSettingDrawerView
            {
                DataContext = new DeviceSettingDrawerViewModel()
            };
            var result = await DrawerHost.open(  drawerView... )

question

Most helpful comment

Tried to use the RoutedCommand?
DrawerHost.OpenDrawerCommand.Execute(NamedDrawerHost, Dock.Left);

All 2 comments

Tried to use the RoutedCommand?
DrawerHost.OpenDrawerCommand.Execute(NamedDrawerHost, Dock.Left);

In addition to the above solution there is also Is*DrawerOpen boolean properties on the DrawerHost that you can simply toggle to open and close the drawers.

Was this page helpful?
0 / 5 - 0 ratings