-
Notifications
You must be signed in to change notification settings - Fork 13
Sheet FAQ
Håvard Moås edited this page Aug 13, 2020
·
8 revisions
The sheet component will not have anything built in to disable the back buttons in the navigation bar. It will also not have anything built in to handle the android back button.
The reason for this is because we have discussed that this might wary in different cases of an app. This should be handled by the consumers of the sheet.
public void OnSomethingChangedEvent(..)
{
if(Sheet.IsOpen)
{
NavigationBar.HasBackButton = false;
}
else
{
NavigationBar.HasBackButton = true;
}
}
<ContentPage
...
NavigationPage.HasBackButton="{Binding ViewModelProperty}"
>
<ContentPage
...
NavigationPage.HasBackButton="{Binding Source{x:reference Sheet}, Path=IsOpen}"
>
...
<dxui:SheetBehavior x:Name="Sheet" ... >
...
public void OnSomethingChangedEvent(..)
{
if(Sheet.IsOpen)
{
NavigationBar.HasNavigationBar = false;
}
else
{
NavigationBar.HasNavigationBar = true;
}
}
<ContentPage
...
NavigationPage.HasNavigationBar="{Binding ViewModelProperty}"
>
Or bind it to the sheet behavior
<ContentPage
...
NavigationPage.HasNavigationBar="{Binding Source{x:reference Sheet}, Path=IsOpen}"
>
...
<dxui:SheetBehavior x:Name="Sheet" ... >
...
- ContentControl
- DataTemplateSelectors
- Date- and TimePicker
- Modality
- Contextual Menus
- RadioButton
- TrendGraph
- Tag
- Toast