Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump CommunityToolkit.Maui.Markup from 2.1.0 to 3.0.0 #146

Merged
merged 3 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/GitStatus.Mobile/GitStatus.Mobile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="4.0.0" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="2.1.0" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="3.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion samples/GitStatus.Mobile/Pages/Base/BaseContentPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected BaseContentPage(in string title = "", bool shouldUseSafeArea = true)

abstract class BaseContentPage<T> : 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;
Expand Down
6 changes: 3 additions & 3 deletions samples/GitStatus.Mobile/Pages/Base/BaseStatusPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
8 changes: 2 additions & 6 deletions samples/GitStatus.Mobile/ViewModels/Base/BaseViewModel.cs
Original file line number Diff line number Diff line change
@@ -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
{
}