Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
[Controls] Fix sample 12574
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarinho authored and hartez committed Nov 25, 2020
1 parent 3e33c01 commit 08831cb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ public ViewModelIssue12574()
Title = "CarouselView Looping";
Items = new ObservableCollection<ModelIssue12574>();
LoadItemsCommand = new Command(() => ExecuteLoadItemsCommand());
RemoveItemsCommand = new Command(() => ExecuteRemoveItemsCommand());
RemoveItemsCommand = new Command(() => ExecuteRemoveItemsCommand(), () => Items.Count > 0);
}
void ExecuteRemoveItemsCommand()
{
Items.Remove(Items.Last());
RemoveItemsCommand.ChangeCanExecute();
}
void ExecuteLoadItemsCommand()
{
Expand All @@ -146,6 +147,7 @@ void ExecuteLoadItemsCommand()
finally
{
IsBusy = false;
RemoveItemsCommand.ChangeCanExecute();
}
}

Expand Down

0 comments on commit 08831cb

Please sign in to comment.