diff --git a/MCTG/Views/App.xaml.cs b/MCTG/Views/App.xaml.cs
index 62a4cdd..681e3c1 100644
--- a/MCTG/Views/App.xaml.cs
+++ b/MCTG/Views/App.xaml.cs
@@ -1,13 +1,38 @@
-namespace Views
+using Microsoft.UI;
+using Windows.Graphics;
+
+#if WINDOWS
+//using Microsoft.UI;
+using Microsoft.UI.Windowing;
+//using Windows.Graphics;
+#endif
+
+namespace Views
{
public partial class App : Application
{
+ const int WindowWidth = 1200;
+ const int WindowHeight = 800;
+
public App()
{
InitializeComponent();
+ Microsoft.Maui.Handlers.WindowHandler.Mapper.AppendToMapping(nameof(IWindow), (handler, view) =>
+ {
+#if WINDOWS
+ var mauiWindow = handler.VirtualView;
+ var nativeWindow = handler.PlatformView;
+ nativeWindow.Activate();
+ IntPtr windowHandle = WinRT.Interop.WindowNative.GetWindowHandle(nativeWindow);
+ WindowId windowId = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(windowHandle);
+ AppWindow appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
+ appWindow.Resize(new SizeInt32(WindowWidth, WindowHeight));
+#endif
+ });
+
MainPage = new AppShell();
Application.Current.UserAppTheme = AppTheme.Light;
}
}
-}
\ No newline at end of file
+}
diff --git a/MCTG/Views/AppShell.xaml b/MCTG/Views/AppShell.xaml
index 488a12d..da7a51f 100644
--- a/MCTG/Views/AppShell.xaml
+++ b/MCTG/Views/AppShell.xaml
@@ -8,10 +8,57 @@
Shell.FlyoutBehavior="Flyout"
Shell.NavBarIsVisible="False">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MCTG/Views/ContainerWithHeader.xaml b/MCTG/Views/ContainerWithHeader.xaml
new file mode 100644
index 0000000..b88eb33
--- /dev/null
+++ b/MCTG/Views/ContainerWithHeader.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
diff --git a/MCTG/Views/ContainerWithHeader.xaml.cs b/MCTG/Views/ContainerWithHeader.xaml.cs
new file mode 100644
index 0000000..2604ce3
--- /dev/null
+++ b/MCTG/Views/ContainerWithHeader.xaml.cs
@@ -0,0 +1,18 @@
+namespace Views;
+
+public partial class ContainerWithHeader : ContentView
+{
+ public ContainerWithHeader()
+ {
+ InitializeComponent();
+ }
+
+ public static BindableProperty MyContentProperty =
+ BindableProperty.Create("MyContent", typeof(View), typeof(ContainerWithHeader), new Grid());
+
+ public View MyContent
+ {
+ get => (View)GetValue(MyContentProperty);
+ set => SetValue(MyContentProperty, value);
+ }
+}
diff --git a/MCTG/Views/CustomHeader.xaml b/MCTG/Views/CustomHeader.xaml
index f79c15e..f99a56d 100644
--- a/MCTG/Views/CustomHeader.xaml
+++ b/MCTG/Views/CustomHeader.xaml
@@ -2,19 +2,18 @@
+ BackgroundColor="{StaticResource Primary}">
-
-
-
-
+
+
+
+
+
diff --git a/MCTG/Views/CustomHeader.xaml.cs b/MCTG/Views/CustomHeader.xaml.cs
index 9a75186..4cf945b 100644
--- a/MCTG/Views/CustomHeader.xaml.cs
+++ b/MCTG/Views/CustomHeader.xaml.cs
@@ -5,5 +5,10 @@ public partial class CustomHeader : ContentView
public CustomHeader()
{
InitializeComponent();
- }
+ }
+
+ private void ImageButton_Clicked(object sender, EventArgs e)
+ {
+ (App.Current.MainPage as Shell).FlyoutIsPresented ^= true;
+ }
}
\ No newline at end of file
diff --git a/MCTG/Views/Home.xaml b/MCTG/Views/Home.xaml
index e0e2c94..5d6c135 100644
--- a/MCTG/Views/Home.xaml
+++ b/MCTG/Views/Home.xaml
@@ -2,75 +2,44 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MCTG/Views/Views.csproj b/MCTG/Views/Views.csproj
index 512d90f..ae0790d 100644
--- a/MCTG/Views/Views.csproj
+++ b/MCTG/Views/Views.csproj
@@ -53,4 +53,19 @@
+
+
+ CustomHeader.xaml
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+