The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
Перейти к файлу
Yann Zahringer Ferrando 23baecafbd
AsyncCommand (#279)
* WeakEventManager added

* AsyncCommand added

* cosmetics

* Update XamarinCommunityToolkit/ObjectModel/IAsyncCommand.shared.cs

* Update XamarinCommunityToolkit/ObjectModel/AsyncCommand.shared.cs

* Update XamarinCommunityToolkit/Helpers/WeakEventManager.shared.cs

* cosmetics

* ArgumentNullException constructor test added

* Lazy isNullableParameterType added

* cosmetics

* Update XamarinCommunityToolkit/ObjectModel/AsyncCommand.shared.cs

* Update XamarinCommunityToolkit/ObjectModel/AsyncCommand.shared.cs

* Update XamarinCommunityToolkit/ObjectModel/AsyncCommand.shared.cs

* CanExecute tests converted to Theory

* build fix

* unit test fix

* async void test fixed with semaphore

* Add AsyncValueCommand & UnitTests

* Update Unit Tests for xUnit

* Delete AsyncCommand_Tests.cs

* Added IAsyncCommand.IsExecuting, IAsyncCommand.AllowsMultipleExecutions

* Add missing NuGet Packages

* Added NuGet Packages

* Fixed Failing Unit Tests

Defer `async void`. This ensures InvalidCommandParameterException is thrown on the calling thread/context before reaching an async void method

* Add BaseCommand, Update Unit Tests

* Finish Unit Tests

* Implement AsyncCommand

* Implement WeakEventManager

* Updated XML Documentation

* Update XML Documentation

* Add & Implement IAsyncCommand<TExecute, TCanExecute>  + IAsyncValueCommand<TExecute, TCanExecute>

* Add IAsyncCommand<TExecute, TCanExecute> Tests, Add IAsyncValueCommand<TExecute, TCanExecute> Tests

* Fix Failing Tests

* Removed Default Parameters

* Update XamarinCommunityToolkit/Helpers/WeakEventManagerService.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/ObjectModel/AsyncCommand.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/ObjectModel/AsyncValueCommand.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/Helpers/WeakEventManager.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/Helpers/WeakEventManager.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/Helpers/WeakEventManagerService.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/Helpers/WeakEventManagerService.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Update XamarinCommunityToolkit/Helpers/WeakEventManager.shared.cs

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>

* Implement ValueTuple for EventManagerService, Remove WeakEventManager from CameraView

* merge build fix

* Re-add .NET Standard 2.1 Support

* null check cleanup

* Increase NETCORE_TEST_VERSION to 3.1.x

* Add null check

Co-authored-by: Andrei <andrei.misiukevich@gmail.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
2020-09-19 01:47:54 +03:00
.github Update dotnet-format-daily.yml 2020-09-03 12:20:05 +02:00
XamarinCommunityToolkit AsyncCommand (#279) 2020-09-19 01:47:54 +03:00
XamarinCommunityToolkit.UnitTests AsyncCommand (#279) 2020-09-19 01:47:54 +03:00
XamarinCommunityToolkitSample AsyncCommand (#279) 2020-09-19 01:47:54 +03:00
XamarinCommunityToolkitSample.Android CameraView Android part 🤖 (#262) 2020-09-14 09:28:39 +02:00
XamarinCommunityToolkitSample.UWP [UWP] CameraView (#252) 2020-09-03 09:12:53 +02:00
XamarinCommunityToolkitSample.iOS CameraView iOS (#244) 2020-08-28 09:28:53 +02:00
assets Added project logo and applied to README and NuGet (#288) 2020-09-10 21:24:28 +02:00
images adding some images for the readme 2020-07-31 11:59:20 -05:00
.editorconfig Update .editorconfig (#212) 2020-08-21 09:34:06 +02:00
.gitattributes reboot time! (#118) 2020-05-31 14:45:34 +02:00
.gitignore Added .mfractor to gitignore (#232) 2020-08-25 12:50:38 +02:00
CODE_OF_CONDUCT.md GH-78 & GH-77 Completely reorganize and update repo! Added StyleCop (#82) 2018-04-06 15:53:25 -07:00
CONTRIBUTING.md Add proposal approval process (#208) 2020-08-19 11:16:52 +03:00
Directory.Build.props Added/Configured a code analyzer (#281) 2020-09-10 10:41:51 +02:00
LICENSE reboot time! (#118) 2020-05-31 14:45:34 +02:00
LICENSE-CODE reboot time! (#118) 2020-05-31 14:45:34 +02:00
README.md Added project logo and applied to README and NuGet (#288) 2020-09-10 21:24:28 +02:00
SUBMITTING-ISSUES.md reboot time! (#118) 2020-05-31 14:45:34 +02:00
ThirdPartyNotices reboot time! (#118) 2020-05-31 14:45:34 +02:00
Xamarin.CommunityToolkit.ruleset Reduce warnings analyzer (#315) 2020-09-17 11:02:12 +02:00
XamarinCommunityToolkit.sln Fixed project name in solution file (#199) 2020-08-12 08:40:08 +02:00
XamarinCommunityToolkitSample.sln CameraView Android part 🤖 (#262) 2020-09-14 09:28:39 +02:00
azure-pipelines.yml AsyncCommand (#279) 2020-09-19 01:47:54 +03:00
stylecop.json GH-78 & GH-77 Completely reorganize and update repo! Added StyleCop (#82) 2018-04-06 15:53:25 -07:00

README.md

Xamarin Community Toolkit

Members of the community are rebooting this library under the guidance of the Xamarin team. The Xamarin Community Toolkit is a collection of common elements for mobile development with Xamarin.Forms that people tend to replicate across multiple apps. It simplifies and demonstrates common developer tasks when building apps with Xamarin.Forms. If you're looking for the historical code to reference, please check the legacy branch.

Build Status

If you like to live dangerously (and while we are preparing our v1), you can use our nightly feed to try out packages right now.

Build Server Type Platform Status
Azure DevOps Build Windows & Mac Build Status

Sample App

Browsing the sample app is the best place to start exploring what's available today.

Installation

The toolkit is available via NuGet, and should be installed into all your projects:

  • NuGet Official Releases: NuGet
  • NuGet Nightly Releases: NuGet Nightly

Now all you need to do is use it!

For example, to use the AvatarView you first include the toolkit namespace:

xmlns:views="clr-namespace:Xamarin.CommunityToolkit.UI.Views;assembly=Xamarin.CommunityToolkit"

Then place the view in your XAML:

<views:AvatarView Text="DO" Size="46" Color="#FF3300" TextColor="White" />

Of course, AvatarView also supports Source for loading images plus a few other properties. Check it out!

AvatarView

Contributions welcome!

If you have one or more of these common pieces of code that you are always replicating across apps, don't hesitate to contribute! We aim to be the first NuGet package you install when creating a new Xamarin app!

Please have a look at our contribution guide before you get started.

Community Toolkit Principles

  • Principle #1: The toolkit will be kept simple.
  • Principle #2: As soon as a comparable feature is available in Xamarin.Forms, it will be marked as deprecated.
  • Principle #3: All features will be supported for two Xamarin.Forms release cycles or until another principle supersedes it.

Project Structure

To structure our project, we have adopted a range of namespaces. You can find them below with a short description of what you will find where.

Namespace Description
Xamarin.CommunityToolkit.Core Core objects that do not fit other namespaces and are used by multiple other components
Xamarin.CommunityToolkit.Behaviors Extended behaviors for the Xamarin.Forms components
Xamarin.CommunityToolkit.Converters XAML converters, used to converted your data binding data into something your XAML understands
Xamarin.CommunityToolkit.Effects Effects to apply light-weight renderer changes to the Xamarin.Forms renderers
Xamarin.CommunityToolkit.Extensions XAML Markup Extensions to make your XAML even more functional
Xamarin.CommunityToolkit.ObjectModel Things that have to do with your models and objects. Probably handy for your MVVM needs
Xamarin.CommunityToolkit.UI.Layout Layouts such as WrapLayout, etc.
Xamarin.CommunityToolkit.UI.Views Controls such as TabView, etc.
Xamarin.CommunityToolkit.SampleApp Sample App where you can find all of the above for reference. Learn how to use them and see how it all looks
Xamarin.CommunityToolkit.UnitTests This is where our unit tests live. Please keep growing them!