diff --git a/samples/GitStatus.Mobile/GitStatus.Mobile.csproj b/samples/GitStatus.Mobile/GitStatus.Mobile.csproj
index d6434b8..c90b651 100644
--- a/samples/GitStatus.Mobile/GitStatus.Mobile.csproj
+++ b/samples/GitStatus.Mobile/GitStatus.Mobile.csproj
@@ -50,7 +50,7 @@
-
+
diff --git a/samples/GitStatus.Mobile/Pages/Base/BaseContentPage.cs b/samples/GitStatus.Mobile/Pages/Base/BaseContentPage.cs
index f9217ae..4d0f499 100644
--- a/samples/GitStatus.Mobile/Pages/Base/BaseContentPage.cs
+++ b/samples/GitStatus.Mobile/Pages/Base/BaseContentPage.cs
@@ -16,7 +16,7 @@ protected BaseContentPage(in string title = "", bool shouldUseSafeArea = true)
abstract class BaseContentPage : BaseContentPage where T : BaseViewModel
{
- protected BaseContentPage(in T viewModel, in string title = "", bool shouldUseSafeArea = false)
+ protected BaseContentPage(in T viewModel, in string title, bool shouldUseSafeArea = false)
: base(title, shouldUseSafeArea)
{
base.BindingContext = viewModel;
diff --git a/samples/GitStatus.Mobile/Pages/Base/BaseStatusPage.cs b/samples/GitStatus.Mobile/Pages/Base/BaseStatusPage.cs
index 24c369a..5969ba9 100644
--- a/samples/GitStatus.Mobile/Pages/Base/BaseStatusPage.cs
+++ b/samples/GitStatus.Mobile/Pages/Base/BaseStatusPage.cs
@@ -14,15 +14,15 @@ protected BaseStatusPage(T statusViewModel, string title) : base(statusViewModel
{
new Label()
.TextColor(Colors.Black).Center().TextCenter()
- .Bind(Label.TextProperty, nameof(BaseStatusViewModel.StatusLabelText)),
+ .Bind(Label.TextProperty, static (BaseStatusViewModel vm) => vm.StatusLabelText),
new Button()
.Text("Get Status").Center()
- .Bind(Button.CommandProperty, nameof(BaseStatusViewModel.GetStatusCommand)),
+ .Bind(Button.CommandProperty, static (BaseStatusViewModel vm) => vm.GetStatusCommand, mode: BindingMode.OneTime),
new ActivityIndicator { Color = Colors.Black }.Center()
.Bind(IsVisibleProperty, nameof(BaseStatusViewModel.IsBusy))
- .Bind(ActivityIndicator.IsRunningProperty, nameof(BaseStatusViewModel.IsBusy))
+ .Bind(ActivityIndicator.IsRunningProperty, static (BaseStatusViewModel vm) => vm.IsBusy)
}
}.Center();
}
diff --git a/samples/GitStatus.Mobile/ViewModels/Base/BaseViewModel.cs b/samples/GitStatus.Mobile/ViewModels/Base/BaseViewModel.cs
index bedc234..9137840 100644
--- a/samples/GitStatus.Mobile/ViewModels/Base/BaseViewModel.cs
+++ b/samples/GitStatus.Mobile/ViewModels/Base/BaseViewModel.cs
@@ -1,11 +1,7 @@
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.ComponentModel;
namespace GitStatus;
-[INotifyPropertyChanged]
-abstract partial class BaseViewModel
+abstract class BaseViewModel : ObservableObject
{
}
\ No newline at end of file