From dd18a211b3c52adcf70fe31aefa8bddca84b8a68 Mon Sep 17 00:00:00 2001 From: xiaoy312 Date: Mon, 6 Nov 2023 13:33:59 -0500 Subject: [PATCH] chore: updated drawer flyout docs --- doc/controls/DrawerFlyoutPresenter.md | 53 +++++++++++++++++-- .../Controls/DrawerFlyoutSamplePage.xaml | 10 ++-- 2 files changed, 52 insertions(+), 11 deletions(-) diff --git a/doc/controls/DrawerFlyoutPresenter.md b/doc/controls/DrawerFlyoutPresenter.md index c0313756f..316d7d6e3 100644 --- a/doc/controls/DrawerFlyoutPresenter.md +++ b/doc/controls/DrawerFlyoutPresenter.md @@ -16,28 +16,40 @@ xmlns:utu="using:Uno.Toolkit.UI" BasedOn="{StaticResource DrawerFlyoutPresenterStyle}" TargetType="FlyoutPresenter"> + ``` ### Properties -todo@xy: add entry for DrawerDepth - Property|Type|Description -|-|- OpenDirection|DrawerOpenDirection|Gets or sets the direction in which the drawer opens toward.
note: The position of drawer when opened is the opposite of this value. +DrawerDepth|GridLength|Get or sets the depth (width or height depending on the `OpenDirection`) of the drawer.\* LightDismissOverlayBackground|Brush|Gets or sets the brush used to paint the light dismiss overlay. The default value is `#80808080` (from the default style). IsGestureEnabled|bool|Get or sets a value that indicates whether the user can interact with the control using gesture. The default value is `true`. ## Usage -todo@xy: add examples here and in sample page for - - depth at different value: Auto, x*, 1*, x - - [FAQ] corner radius with proper background +- For DrawerDepth, this value has 3 mode based on `GridUnitType`: + ```xml + + + + + + + ``` + > remarks: `Padding` is used on the flyout content to avoid content being clipped. +- Custom background + ```xml + + + + + + + + + + ``` + > remarks: Do not set `Background` directly from the flyout content. Instead, `Background` should be set from style setter to avoid edge bleeding on certain platforms, and to avoid background being painted on the rounded corners. diff --git a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/Controls/DrawerFlyoutSamplePage.xaml b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/Controls/DrawerFlyoutSamplePage.xaml index 59748c667..c63b5e29f 100644 --- a/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/Controls/DrawerFlyoutSamplePage.xaml +++ b/samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/Controls/DrawerFlyoutSamplePage.xaml @@ -78,11 +78,10 @@ - +