diff --git a/CS/DrawerViewExample/App.xaml b/CS/DrawerViewExample/App.xaml
index d08221a..dd4d6c3 100644
--- a/CS/DrawerViewExample/App.xaml
+++ b/CS/DrawerViewExample/App.xaml
@@ -5,6 +5,6 @@
x:Class="DrawerViewExample.App"
windows:Application.ImageDirectory="Assets">
-
+
diff --git a/CS/DrawerViewExample/DrawerViewExample.csproj b/CS/DrawerViewExample/DrawerViewExample.csproj
index 0896337..6713c1e 100644
--- a/CS/DrawerViewExample/DrawerViewExample.csproj
+++ b/CS/DrawerViewExample/DrawerViewExample.csproj
@@ -32,10 +32,6 @@
-
-
-
-
False
diff --git a/CS/DrawerViewExample/MainPage.xaml b/CS/DrawerViewExample/MainPage.xaml
index ba7efc9..f9051e6 100644
--- a/CS/DrawerViewExample/MainPage.xaml
+++ b/CS/DrawerViewExample/MainPage.xaml
@@ -1,50 +1,40 @@
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CS/DrawerViewExample/MainPage.xaml.cs b/CS/DrawerViewExample/MainPage.xaml.cs
index b55e9e5..e1c0b71 100644
--- a/CS/DrawerViewExample/MainPage.xaml.cs
+++ b/CS/DrawerViewExample/MainPage.xaml.cs
@@ -1,10 +1,9 @@
using System;
using Microsoft.Maui.Controls;
-using DevExpress.Maui.Navigation;
using System.Globalization;
namespace DrawerViewExample {
- public partial class MainPage : ContentPage {
+ public partial class MainPage : FlyoutPage {
const string IsLandscapeOrientedPropertyName = "IsLandscapeOriented";
public static readonly BindableProperty IsLandscapeOrientedProperty = BindableProperty.Create(
@@ -18,13 +17,16 @@ public bool IsLandscapeOriented {
set => SetValue(IsLandscapeOrientedProperty, value);
}
public MainPage() {
- InitializeComponent();
- drawer.IsDrawerOpened = true;
+ InitializeComponent();
SizeChanged += OnSizeChanged;
+ carBrandList.SelectionChanged += OnSelectionChanged;
}
protected void OnSizeChanged(object sender, EventArgs args) {
IsLandscapeOriented = this.Width > this.Height;
}
+ void OnSelectionChanged(object sender, SelectionChangedEventArgs e) {
+ IsPresented = false;
+ }
protected override void OnAppearing() {
base.OnAppearing();
@@ -34,9 +36,9 @@ protected override void OnAppearing() {
class BoolToDrawerBehaviorConverter : IValueConverter {
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
- if (targetType != typeof(DrawerBehavior)) return null;
+ if (targetType != typeof(FlyoutLayoutBehavior)) return null;
bool boolValue = (bool)value;
- return boolValue ? DrawerBehavior.Split : DrawerBehavior.SlideOnTop;
+ return boolValue ? FlyoutLayoutBehavior.Split : FlyoutLayoutBehavior.Popover;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
diff --git a/CS/DrawerViewExample/MauiProgram.cs b/CS/DrawerViewExample/MauiProgram.cs
index 9d8922b..21a9cc9 100644
--- a/CS/DrawerViewExample/MauiProgram.cs
+++ b/CS/DrawerViewExample/MauiProgram.cs
@@ -1,7 +1,6 @@
using Microsoft.Maui;
using Microsoft.Maui.Hosting;
-using Microsoft.Maui.Controls.Hosting;
-using DevExpress.Maui;
+using Microsoft.Maui.Controls.Hosting;
namespace DrawerViewExample {
public static class MauiProgram {
@@ -9,7 +8,6 @@ public static MauiApp CreateMauiApp() {
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
- .UseDevExpress()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
diff --git a/CS/DrawerViewExample/Resources/Images/hamburger.svg b/CS/DrawerViewExample/Resources/Images/hamburger.svg
new file mode 100644
index 0000000..0429d34
--- /dev/null
+++ b/CS/DrawerViewExample/Resources/Images/hamburger.svg
@@ -0,0 +1 @@
+
\ No newline at end of file