From 103c501d56304cdfcaafd9ffb6ab96d326c2ee11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=83=D0=BF=D1=81=D0=B8=D0=BD=D1=8C?= Date: Wed, 5 Mar 2025 09:11:53 +0300 Subject: [PATCH] rt --- FlyoutPage1.xaml | 16 -------------- FlyoutPage1.xaml.cs | 36 ------------------------------ FlyoutPage1Detail.xaml | 9 -------- FlyoutPage1Detail.xaml.cs | 20 ----------------- FlyoutPage1Flyout.xaml | 45 ------------------------------------- FlyoutPage1Flyout.xaml.cs | 56 ----------------------------------------------- MobileApp.csproj | 24 +++++--------------- MobileApp.csproj.user | 5 +++++ NewPage1.xaml | 12 ++++++++++ NewPage1.xaml.cs | 9 ++++++++ 10 files changed, 32 insertions(+), 200 deletions(-) delete mode 100644 FlyoutPage1.xaml delete mode 100644 FlyoutPage1.xaml.cs delete mode 100644 FlyoutPage1Detail.xaml delete mode 100644 FlyoutPage1Detail.xaml.cs delete mode 100644 FlyoutPage1Flyout.xaml delete mode 100644 FlyoutPage1Flyout.xaml.cs create mode 100644 NewPage1.xaml create mode 100644 NewPage1.xaml.cs diff --git a/FlyoutPage1.xaml b/FlyoutPage1.xaml deleted file mode 100644 index ed8bf59..0000000 --- a/FlyoutPage1.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/FlyoutPage1.xaml.cs b/FlyoutPage1.xaml.cs deleted file mode 100644 index 19f6c05..0000000 --- a/FlyoutPage1.xaml.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Xamarin.Forms; -using Xamarin.Forms.Xaml; - -namespace MobileApp -{ - [XamlCompilation(XamlCompilationOptions.Compile)] - public partial class FlyoutPage1 : FlyoutPage - { - public FlyoutPage1() - { - InitializeComponent(); - FlyoutPage.ListView.ItemSelected += ListView_ItemSelected; - } - - private void ListView_ItemSelected(object sender, SelectedItemChangedEventArgs e) - { - var item = e.SelectedItem as FlyoutPage1FlyoutMenuItem; - if (item == null) - return; - - var page = (Page)Activator.CreateInstance(item.TargetType); - page.Title = item.Title; - - Detail = new NavigationPage(page); - IsPresented = false; - - FlyoutPage.ListView.SelectedItem = null; - } - } -} \ No newline at end of file diff --git a/FlyoutPage1Detail.xaml b/FlyoutPage1Detail.xaml deleted file mode 100644 index b13a576..0000000 --- a/FlyoutPage1Detail.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - \ No newline at end of file diff --git a/FlyoutPage1Detail.xaml.cs b/FlyoutPage1Detail.xaml.cs deleted file mode 100644 index 737697b..0000000 --- a/FlyoutPage1Detail.xaml.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using Xamarin.Forms; -using Xamarin.Forms.Xaml; - -namespace MobileApp -{ - [XamlCompilation(XamlCompilationOptions.Compile)] - public partial class FlyoutPage1Detail : ContentPage - { - public FlyoutPage1Detail() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/FlyoutPage1Flyout.xaml b/FlyoutPage1Flyout.xaml deleted file mode 100644 index 8652a0c..0000000 --- a/FlyoutPage1Flyout.xaml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FlyoutPage1Flyout.xaml.cs b/FlyoutPage1Flyout.xaml.cs deleted file mode 100644 index 17f73ec..0000000 --- a/FlyoutPage1Flyout.xaml.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; - -using Xamarin.Forms; -using Xamarin.Forms.Xaml; - -namespace MobileApp -{ - [XamlCompilation(XamlCompilationOptions.Compile)] - public partial class FlyoutPage1Flyout : ContentPage - { - public ListView ListView; - - public FlyoutPage1Flyout() - { - InitializeComponent(); - - BindingContext = new FlyoutPage1FlyoutViewModel(); - ListView = MenuItemsListView; - } - - private class FlyoutPage1FlyoutViewModel : INotifyPropertyChanged - { - public ObservableCollection MenuItems { get; set; } - - public FlyoutPage1FlyoutViewModel() - { - MenuItems = new ObservableCollection(new[] - { - new FlyoutPage1FlyoutMenuItem { Id = 0, Title = "Page 1" }, - new FlyoutPage1FlyoutMenuItem { Id = 1, Title = "Page 2" }, - new FlyoutPage1FlyoutMenuItem { Id = 2, Title = "Page 3" }, - new FlyoutPage1FlyoutMenuItem { Id = 3, Title = "Page 4" }, - new FlyoutPage1FlyoutMenuItem { Id = 4, Title = "Page 5" }, - }); - } - - #region INotifyPropertyChanged Implementation - public event PropertyChangedEventHandler PropertyChanged; - void OnPropertyChanged([CallerMemberName] string propertyName = "") - { - if (PropertyChanged == null) - return; - - PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - } - } -} \ No newline at end of file diff --git a/MobileApp.csproj b/MobileApp.csproj index ec63ebf..570650e 100644 --- a/MobileApp.csproj +++ b/MobileApp.csproj @@ -57,27 +57,15 @@ - - - - - - - - MSBuild:UpdateDesignTimeXaml - - - MSBuild:UpdateDesignTimeXaml - - - MSBuild:UpdateDesignTimeXaml - - - - + + + MSBuild:Compile + + + diff --git a/MobileApp.csproj.user b/MobileApp.csproj.user index de29182..faf4ec1 100644 --- a/MobileApp.csproj.user +++ b/MobileApp.csproj.user @@ -11,6 +11,11 @@ + + Designer + + + Designer diff --git a/NewPage1.xaml b/NewPage1.xaml new file mode 100644 index 0000000..c0b1fa3 --- /dev/null +++ b/NewPage1.xaml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/NewPage1.xaml.cs b/NewPage1.xaml.cs new file mode 100644 index 0000000..a939885 --- /dev/null +++ b/NewPage1.xaml.cs @@ -0,0 +1,9 @@ +namespace MobileApp; + +public partial class NewPage1 : ContentPage +{ + public NewPage1() + { + InitializeComponent(); + } +} \ No newline at end of file