From 6bad67708e1209be861cc8241926d7ccf019f810 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Feb 2023 02:09:49 +0700 Subject: [PATCH] [Bug]: cake build missing property and app bar buttons --- build.cake | 14 ++++ .../SfBadgeView/SfBadgeViewControlInfo.cs | 17 +++++ .../SfBadgeView/SfBadgeViewPage.xaml | 64 +++++++++++++++++++ .../SfBadgeView/SfBadgeViewPage.xaml.cs | 12 ++++ .../SfBadgeView/SfBadgeViewPageViewModel.cs | 26 ++++++++ src/MauiProgram.cs | 1 + 6 files changed, 134 insertions(+) create mode 100644 src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewControlInfo.cs create mode 100644 src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml create mode 100644 src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml.cs create mode 100644 src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPageViewModel.cs diff --git a/build.cake b/build.cake index afa05373..3b60ecce 100644 --- a/build.cake +++ b/build.cake @@ -49,9 +49,23 @@ class {name}ControlInfo : IControlInfo xmlns=""http://schemas.microsoft.com/dotnet/2021/maui"" xmlns:x=""http://schemas.microsoft.com/winfx/2009/xaml"" xmlns:app=""clr-namespace:MAUIsland"" + Padding=""10"" x:Class=""MAUIsland.{name}Page"" x:DataType=""app:{name}PageViewModel"" Title=""{name}""> + + + + + diff --git a/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewControlInfo.cs b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewControlInfo.cs new file mode 100644 index 00000000..2fa28a4e --- /dev/null +++ b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewControlInfo.cs @@ -0,0 +1,17 @@ +using Syncfusion.Maui.Core; + +namespace MAUIsland.Gallery.Syncfusion; +class SfBadgeViewControlInfo : IControlInfo +{ + public string ControlName => nameof(SfBadgeView); + public string ControlRoute => typeof(SfBadgeViewPage).FullName; + public ImageSource ControlIcon => new FontImageSource() + { + FontFamily = FontNames.FluentSystemIconsRegular, + Glyph = FluentUIIcon.Ic_fluent_mail_alert_24_regular + }; + public string ControlDetail => "Badges are used to notify users of new or unread messages, notifications, or the status of something."; + public string GitHubUrl => $"https://github.com/Strypper/mauisland/tree/main/src/Features/Gallery/Pages/Syncfusion/{ControlName}"; + public string DocumentUrl => $"https://help.syncfusion.com/maui/badge-view/overview"; + public string GroupName => ControlGroupInfo.SyncfusionControls; +} \ No newline at end of file diff --git a/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml new file mode 100644 index 00000000..a42f6ebb --- /dev/null +++ b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + SfBadgeView defines the following properties: + + + + These properties are backed by BindableProperty objects, which means that they can be targets of data bindings, and styled. + + + + + Color, of type Color , value that defines the color of the ActivityIndicator. + ]]> + + + IsRunning, of type bool,value that indicates whether the ActivityIndicator should be visible and animating, or hidden. The default value of this property is false, which indicates that the ActivityIndicator isn't visible. + ]]> + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml.cs b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml.cs new file mode 100644 index 00000000..f6d89842 --- /dev/null +++ b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPage.xaml.cs @@ -0,0 +1,12 @@ +namespace MAUIsland; +public partial class SfBadgeViewPage : IControlPage +{ + #region [CTor] + public SfBadgeViewPage(SfBadgeViewPageViewModel vm) + { + InitializeComponent(); + + BindingContext = vm; + } + #endregion +} \ No newline at end of file diff --git a/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPageViewModel.cs b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPageViewModel.cs new file mode 100644 index 00000000..715610b6 --- /dev/null +++ b/src/Features/Gallery/Pages/Syncfusion/SfBadgeView/SfBadgeViewPageViewModel.cs @@ -0,0 +1,26 @@ +namespace MAUIsland; +public partial class SfBadgeViewPageViewModel : NavigationAwareBaseViewModel +{ + #region [CTor] + public SfBadgeViewPageViewModel( + IAppNavigator appNavigator + ) : base(appNavigator) + { + } + #endregion + + #region [Properties] + [ObservableProperty] + IControlInfo controlInformation; + #endregion + + #region [Overrides] + protected override void OnInit(IDictionary query) + { + base.OnInit(query); + + ControlInformation = query.GetData(); + + } + #endregion +} \ No newline at end of file diff --git a/src/MauiProgram.cs b/src/MauiProgram.cs index e7c1bf86..dcf2512f 100644 --- a/src/MauiProgram.cs +++ b/src/MauiProgram.cs @@ -1,6 +1,7 @@ using CommunityToolkit.Maui; using CommunityToolkit.Maui.Core; using CommunityToolkit.Maui.Storage; +using Microsoft.Extensions.Logging; using Microsoft.Maui.Handlers; using Refit; using SkiaSharp.Views.Maui.Controls.Hosting;