Skip to content

Releases: CommunityToolkit/Maui.Markup

v8.0.0: Compiled Bindings, Improved Complex (Nested) Bindings, .NET 11 Compatibility

Choose a tag to compare

@TheCodeTraveler TheCodeTraveler released this 24 Jul 16:55
Immutable release. Only release title and notes can be modified.
6fef5c9

.NET 11 Compatibility

This release provides compatibility for the upcoming release of .NET 11.

In .NET 11, CommunityToolkit.Maui.Markup will no longer have access to internal .NET MAUI APIs. This release removes our use of internal .NET MAUI APIs to ensure compatibility with .NET 11.

Important

We recommend every .NET MAUI app preparing for .NET 11 install this release, v8.0.0 (or later), before .NET 11 is released in November. Apps running CommunityToolkit.Maui.Markup v7.0.1 and earlier will not be compatible with .NET 11.

Compiled Bindings

Thanks to @stephenquan, markup bindings now support BindingBase.Create 🎉

BindingBase bindings support compiled bindings created with the BindingBase.Create method. This approach supports nested, one-way, and two-way bindings. For example, the following code creates a nested two-way binding to ViewModel.NestedObject.Text:

new Entry().Bind(
    Entry.TextProperty,
    BindingBase.Create(static (ViewModel vm) => vm.NestedObject.Text, BindingMode.TwoWay));

Improved Complex Bindings

Complex (aka Nested) Bindings are now easier than ever! There is now no need to add the handlers parameter.

Using the below ViewModel class, we can create a nested two-way binding directly to ViewModel.NestedObject.Text:

New Way

new Entry().Bind(
    Entry.TextProperty,
    getter: static (ViewModel vm) => vm.NestedObject.Text,
    setter: static (ViewModel vm, string text) => vm.NestedObject.Text = text);

Old Way

new Entry().Bind(
    Entry.TextProperty,
    getter: static (ViewModel vm) => vm.NestedObject.Text,
    handlers:  // Obsolete
    [
        (vm => vm, nameof(ViewModel.NestedObject)),
        (vm => vm.NestedObject, nameof(ViewModel.NestedObject.Text)),
    ],
    setter: static (ViewModel vm, string text) => vm.NestedObject.Text = text);
class ViewModel
{
    public NestedObject NestedObject { get; set; } = new()

    public string Text { get; set; } = string.Empty;
}

class NestedObject
{
    public string Text { get; set; } = string.Empty;
}

What's Changed

  • Add actions read permission to NuGet release job by @jfversluis in #470
  • Add BindingBase Bind overload + tests for nested path propagation by @stephenquan in
  • Remove .NET MAUI internals usage by @jfversluis in #452

New Contributors

Housekeeping

  • Bump actions/download-artifact from 7 to 8 by @dependabot[bot] in #415
  • Bump actions/upload-artifact from 6 to 7 by @dependabot[bot] in #414
  • Bump BenchmarkDotNet from 0.15.6 to 0.15.8 by @dependabot[bot] in #418
  • Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.14.0 to 5.3.0 by @dependabot[bot] in #422
  • Bump Microsoft.CodeAnalysis.CSharp from 4.14.0 to 5.3.0 by @dependabot[bot] in #421
  • Bump Refit.HttpClientFactory from 8.0.0 to 10.1.6 by @dependabot[bot] in #423
  • Bump CommunityToolkit.Mvvm from 8.4.0 to 8.4.2 by @dependabot[bot] in #420
  • Bump CommunityToolkit.Mvvm from 8.4.0 to 8.4.2 by @dependabot[bot] in #424
  • Bump Microsoft.Extensions.Http.Resilience from 10.0.0 to 10.6.0 by @dependabot[bot] in #425
  • Bump Microsoft.NET.Test.Sdk from 18.0.1 to 18.5.1 by @dependabot[bot] in #428
  • Bump NUnit from 4.4.0 to 4.6.0 by @dependabot[bot] in #430
  • Bump NUnit.Analyzers from 4.11.2 to 4.13.0 by @dependabot[bot] in #431
  • Bump NUnit from 4.6.0 to 4.6.1 by @dependabot[bot] in #434
  • Bump Microsoft.Testing.Extensions.CodeCoverage from 18.0.4 to 18.7.0 by @dependabot[bot] in #433
  • Bump NUnit3TestAdapter from 5.2.0 to 6.2.0 by @dependabot[bot] in #432
  • Bump PolySharp from 1.15.0 to 1.16.0 by @dependabot[bot] in #435
  • Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 by @dependabot[bot] in #436
  • Bump actions/setup-dotnet from 5.2.0 to 5.3.0 by @dependabot[bot] in #440
  • Bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #439
  • Bump NUnit.Analyzers from 4.13.0 to 4.14.0 by @dependabot[bot] in #438
  • Bump CommunityToolkit.Maui from 14.1.1 to 14.2.0 by @dependabot[bot] in #437
  • Bump Refit.HttpClientFactory from 10.1.6 to 11.0.0 by @dependabot[bot] in #441
  • Bump Microsoft.Testing.Extensions.CodeCoverage from 18.7.0 to 18.8.0 by @dependabot[bot] in #443
  • Bump Refit.HttpClientFactory from 11.0.0 to 11.0.1 by @dependabot[bot] in #442
  • Bump Microsoft.Extensions.Http.Resilience from 10.6.0 to 10.7.0 by @dependabot[bot] in #444
  • Bump Microsoft.Maui.Controls.Compatibility from 10.0.70 to 10.0.71 by @dependabot[bot] in #446
  • Bump Refit.HttpClientFactory from 11.0.1 to 11.1.0 by @dependabot[bot] in #447
  • Bump actions/setup-java from 5.2.0 to 5.3.0 by @dependabot[bot] in #448
  • Bump actions/checkout from 6.0.3 to 7.0.0 by @dependabot[bot] in #449
  • Bump Refit.HttpClientFactory from 11.1.0 to 11.2.0 by @dependabot[bot] in #450
  • Bump Microsoft.NET.Test.Sdk from 18.6.0 to 18.7.0 by @dependabot[bot] in #451
  • Bump Refit.HttpClientFactory from 11.2.0 to 12.0.0 by @dependabot[bot] in #453
  • Bump Microsoft.Maui.Controls from 10.0.71 to 10.0.80 by @dependabot[bot] in #454
  • Bump actions/setup-java from 5.3.0 to 5.4.0 by @dependabot[bot] in #456
  • Bump Refit.HttpClientFactory from 12.0.0 to 12.1.0 by @dependabot[bot] in #458
  • Bump actions/setup-dotnet from 5.3.0 to 5.4.0 by @dependabot[bot] in #457
  • Bump Refit.HttpClientFactory from 12.1.0 to 13.0.0 by @dependabot[bot] in #459
  • Bump Microsoft.Testing.Extensions.CodeCoverage from 18.8.0 to 18.9.0 by @dependabot[bot] in #464
  • Bump Refit.HttpClientFactory from 13.0.0 to 13.1.0 by @dependabot[bot] in #463
  • Bump actions/setup-java from 5.4.0 to 5.5.0 by @dependabot[bot] in #466
  • Bump Microsoft.NET.Test.Sdk from 18.7.0 to 18.8.1 by @dependabot[bot] in #468
  • Bump Microsoft.Extensions.Http.Resilience from 10.7.0 to 10.8.0 by @dependabot[bot] in #469
  • Use NuGet trusted publishing by @jfversluis in #460
  • Bump CommunityToolkit.Maui from 14.2.0 to 14.2.2 by @dependabot[bot] in #471
  • Bump actions/setup-dotnet from 5.4.0 to 6.0.0 by @dependabot[bot] in #474
  • Bump actions/setup-java from 5.5.0 to 5.6.0 by @dependabot[bot] in #473
  • Bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #472
    #417
  • Bump Microsoft.Maui.Controls from 10.0.80 to 10.0.90 by @dependabot[bot] in #475
  • Bump Microsoft.Maui.Controls.Compatibility from 10.0.80 to 10.0.90 by @dependabot[bot] in #476

Full Changelog: 7.0.1...v8.0.0

7.0.1: Increase `Microsoft.Maui.Controls` Dependency

Choose a tag to compare

@TheCodeTraveler TheCodeTraveler released this 25 Feb 23:43
Immutable release. Only release title and notes can be modified.
8d421a3

CommunityToolkit.Maui.Markup v7.0.1

This Release increases the Microsoft.Maui.Controls Dependency to v10.0.41 due to a known regression in v10.0.40

What's Changed

Full Changelog: 7.0.0...7.0.1

7.0.0: .NET 10 support is here!

Choose a tag to compare

@jfversluis jfversluis released this 12 Nov 20:40
Immutable release. Only release title and notes can be modified.
d15a3d0

Breaking Changes

  • .NET 10 Required

What's Changed

Full Changelog: 6.0.1...7.0.0

6.0.1

Choose a tag to compare

@jfversluis jfversluis released this 10 Jun 09:22
77d616d

What's Changed

  • Bump actions/checkout from 3 to 4 by @dependabot in #385
  • Bump xamarin/backport-bot-action from 1.0 to 2.0 by @dependabot in #386
  • Bump peter-evans/create-pull-request from 3 to 7 by @dependabot in #387
  • Bump jfversluis/dotnet-format from 1.0.5 to 1.0.9 by @dependabot in #384
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #389
  • Fix RS1038 Warning: Compiler extensions should be implemented in assemblies with compiler-provided references by @TheCodeTraveler in #390

Full Changelog: 6.0.0...6.0.1

6.0.0: TypedBinding now supports nullable types

Choose a tag to compare

@jfversluis jfversluis released this 15 Apr 07:14

This release contains a small breaking change where the setter now returns a nullable result. This means that devs may get a compiler error if they are binding a non-nullable property to a nullable bindable property.

Here's an example using a non-nullable string in a View Model to bind to Label.Text which can be null:

public class LabelViewModel : ObservableObject
{
    [ObservableProperty] 
    public partial string Text { get; set; }
}
new Label()
   .Bind(Label.TextProperty,
         getter: static (LabelViewModel vm) => vm.Text,
         setter: static (vm, text) => vm.Text = text, // <--- This is where the breaking change happens
         mode: BindingMode.TwoWay)

becomes

new Label()
   .Bind(Label.TextProperty,
         getter: static (LabelViewModel vm) => vm.Text,
         setter: static (vm, text) => vm.Text = text ?? string.Empty, // <--- This is where the breaking change happens
         mode: BindingMode.TwoWay)

What's Changed

  • Fixed issue in TypedBinding not being able to support nullable types properly by @jBijsterboschNL in #381

Dependencies and other housekeeping

  • Bump MauiPackageVersion from 9.0.10 to 9.0.12 in /samples by @dependabot in #344
  • Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.11.0 to 4.12.0 in /samples by @dependabot in #346
  • Bump CommunityToolkit.Mvvm from 8.3.2 to 8.4.0 in /samples by @dependabot in #348
  • Bump MauiPackageVersion from 9.0.12 to 9.0.14 in /samples by @dependabot in #347
  • Bump CommunityToolkit.Mvvm from 8.4.0-preview1 to 8.4.0 in /samples by @dependabot in #350
  • Bump MauiPackageVersion from 9.0.14 to 9.0.21 in /samples by @dependabot in #349
  • Bump NUnit from 4.2.2 to 4.3.0 in /samples by @dependabot in #351
  • Bump CommunityToolkit.Maui from 9.1.1 to 10.0.0 in /samples by @dependabot in #352
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #353
  • Bump NUnit.Analyzers from 4.4.0 to 4.5.0 in /samples by @dependabot in #357
  • Bump NUnit from 4.3.0 to 4.3.1 in /samples by @dependabot in #358
  • Bump NUnit from 4.3.1 to 4.3.2 in /samples by @dependabot in #359
  • Bump coverlet.collector from 6.0.2 to 6.0.3 in /samples by @dependabot in #360
  • Bump MauiPackageVersion from 9.0.21 to 9.0.22 in /samples by @dependabot in #361
  • Bump NUnit.Analyzers from 4.5.0 to 4.6.0 in /samples by @dependabot in #362
  • Bump Microsoft.Extensions.Http.Resilience from 9.0.0 to 9.1.0 in /samples by @dependabot in #364
  • Bump MauiPackageVersion from 9.0.22 to 9.0.30 in /samples by @dependabot in #363
  • Bump CommunityToolkit.Maui from 10.0.0 to 11.0.0 in /samples by @dependabot in #365
  • Bump coverlet.collector from 6.0.3 to 6.0.4 in /samples by @dependabot in #366
  • [Housekeeping] Upgrade to Microsoft.Testing.Platform by @TheCodeTraveler in #370
  • Bump CommunityToolkit.Maui from 11.0.0 to 11.1.0 in /samples by @dependabot in #372
  • Bump Microsoft.Maui.Controls from 9.0.30 to 9.0.40 in /samples by @dependabot in #373
  • Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.12.0 to 4.13.0 in /samples by @dependabot in #375
  • Bump Microsoft.Testing.Extensions.CodeCoverage from 17.13.1 to 17.14.2 in /samples by @dependabot in #376
  • Bump Microsoft.Maui.Controls from 9.0.40 to 9.0.50 in /samples by @dependabot in #377
  • Bump Microsoft.Extensions.Http.Resilience from 9.1.0 to 9.3.0 in /samples by @dependabot in #378
  • Bump NUnit.Analyzers from 4.6.0 to 4.7.0 in /samples by @dependabot in #380
  • Bump Microsoft.Maui.Controls from 9.0.50 to 9.0.60 in /samples by @dependabot in #382
  • Build & Release with GitHub Actions by @jfversluis in #383

New Contributors

Full Changelog: 5.1.0...6.0.0

5.1.0

Choose a tag to compare

@jfversluis jfversluis released this 28 Nov 18:29
0d40bd0

What's Changed

We’ve re-added string-based bindings for Gesture extensions! Apologies for removing them in 5.0.0.

.BindTapGesture(nameof(TrendsViewModel.TappedCommand, source: new RelativeBindingSource(RelativeBindingSourceMode.FindAncestorBindingContext, typeof(TrendsViewModel)))

Note: These string-based gesture extensions have been moved to a new class, StringGesturesExtensions. Here's an example to call the methods directly in lieu of using it as an extension method (above):

StringGesturesExtensions.BindTapGesture(myLabel, nameof(TrendsViewModel.TappedCommand), commandSource: new RelativeBindingSource(RelativeBindingSourceMode.FindAncestorBindingContext, typeof(TrendsViewModel)));

Thanks @egvijayanand! 🙌

String-based bindings are not trim safe, but they are currently the only way to use RelativeBindingSource.

  • Bump Newtonsoft.Json and Microsoft.NET.Test.Sdk in /samples by @dependabot in #337
  • Add String-based Gesture Extensions by @brminnick in #339
  • Bump PolySharp from 1.14.1 to 1.15.0 in /samples by @dependabot in #338

Full Changelog: 5.0.0...5.1.0

v5.0.0: .NET 9 support has arrived!

Choose a tag to compare

@jfversluis jfversluis released this 22 Nov 09:27

Breaking Changes

  • String-based bindings are no-longer trim safe
    • eg .Bind(Label.TextProperty, nameof(MyViewModel.LabelText) is not trim safe
    • Use .Bind(Label.TextProperty, static (MyViewModel vm) => vm.LabelText) instead
  • .BindClickGesture Removed
    • Use .BindTapGesture instead
  • .ClickGesture Removed
    • Use .TapGesture instead
  • NuGet package will not support Microsoft.Maui.Controls .NET 10 until .NET 10 GA

Requirements

The following tools are now required for CommunityToolkit.Maui.Markup:

  • Xcode 16.0.0
    • Read the latest .NET MAUI Release wiki to always find the latest-supported version) of Xcode for .NET MAUI
    • We HIGHLY recommend using the open-source tool Xcodes to easily manage your installed Xcode versions
  • Update to the latest stable version of Visual Studio (or Jet Brains Rider)
  • Download/install .NET SDK v9.0.100
  • After installing the latest stable .NET SDK, update to the latest stable version of the .NET MAUI workload:
    • On macOS, open the Terminal and enter the following command: sudo dotnet workload install maui
    • On Windows, open the command prompt (or Powershell) and enter the following command: dotnet workload install maui
  • Add a global.json file to your application with the following parameters to ensure you're not using a unsupported preview version of .NET (example below)
    • The .NET MAUI Community Toolkit does not support preview releases of .NET

global.json

{
  "sdk": {
    "version": "9.0.100", 
    "rollForward": "latestFeature",
    "allowPrerelease": false
  }
}

What's Changed

  • Update to .NET 9 by @brminnick in #324

But wait, there's more!

  • Bump MauiPackageVersion from 8.0.91 to 8.0.92 in /samples by @dependabot in #325
  • Bump CommunityToolkit.Mvvm from 8.2.2 to 8.3.2 in /samples by @dependabot in #326
  • Bump Refit.HttpClientFactory from 7.1.2 to 7.2.1 in /samples by @dependabot in #328
  • Bump Microsoft.Extensions.Http.Resilience from 8.8.0 to 8.10.0 in /samples by @dependabot in #327
  • Bump CommunityToolkit.Mvvm from 8.3.0 to 8.3.2 in /samples by @dependabot in #330
  • Bump Refit.HttpClientFactory from 7.2.1 to 8.0.0 in /samples by @dependabot in #331
  • Bump MauiPackageVersion from 8.0.92 to 8.0.93 in /samples by @dependabot in #332
  • Bump CommunityToolkit.Maui from 9.1.0 to 9.1.1 in /samples by @dependabot in #333
  • [Housekeeping] Add SourceLink by @brminnick in #322
  • Bump NUnit.Analyzers from 4.3.0 to 4.4.0 in /samples by @dependabot in #335

Full Changelog: 4.2.0...5.0.0

v4.2.0: AOT support is here!

Choose a tag to compare

@jfversluis jfversluis released this 15 Oct 09:31
2c72979

What's Changed

  • Enable AOT Support by @brminnick in #312
  • Improve Benchmarks by @brminnick in #313

Lots of bumps ðŸŦ

  • Bump Microsoft.CodeAnalysis.CSharp from 4.10.0 to 4.11.0 in /samples by @dependabot in #297
  • Bump Microsoft.CodeAnalysis.Analyzers from 3.3.3 to 3.3.4 in /samples by @dependabot in #298
  • Bump MauiCommunityToolkitPackageVersion from 9.0.2 to 9.0.3 in /samples by @dependabot in #299
  • Bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.0 in /samples by @dependabot in #302
  • Bump MauiPackageVersion from 8.0.71 to 8.0.80 in /samples by @dependabot in #301
  • Bump Microsoft.CodeAnalysis.CSharp from 4.1.0 to 4.11.0 in /samples by @dependabot in #300
  • Bump NUnit from 4.1.0 to 4.2.0 in /samples by @dependabot in #303
  • Bump NUnit from 4.2.0 to 4.2.1 in /samples by @dependabot in #304
  • Bump CommunityToolkit.Mvvm from 8.2.2 to 8.3.0 in /samples by @dependabot in #305
  • Bump MauiPackageVersion from 8.0.80 to 8.0.82 in /samples by @dependabot in #307
  • Bump NUnit from 4.2.1 to 4.2.2 in /samples by @dependabot in #309
  • Bump Microsoft.NET.Test.Sdk from 17.11.0 to 17.11.1 in /samples by @dependabot in #310
  • [Housekeeping] Utilize NUnit.Analyzers for Unit Tests by @brminnick in #311
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #314
  • Bump MauiPackageVersion from 8.0.82 to 8.0.90 in /samples by @dependabot in #315
  • Bump MauiPackageVersion from 8.0.90 to 8.0.91 in /samples by @dependabot in #318
  • Bump CommunityToolkit.Maui from 9.0.3 to 9.1.0 in /samples by @dependabot in #319
  • Bump Microsoft.CodeAnalysis.Analyzers from 3.3.4 to 3.11.0 in /samples by @dependabot in #320

Full Changelog: 4.1.0...4.2.0

4.1.0

Choose a tag to compare

@jfversluis jfversluis released this 16 Aug 13:26
ae72391

What's Changed

  • Bump CommunityToolkit.Maui from 6.1.0 to 7.0.0 in /samples by @dependabot in #266
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #267
  • Bump Microsoft.CodeAnalysis.CSharp from 4.7.0 to 4.8.0 in /samples by @dependabot in #268
  • Bump NUnit from 3.14.0 to 4.0.0 in /samples by @dependabot in #269
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #270
  • Bump PolySharp from 1.13.2 to 1.14.0 in /samples by @dependabot in #271
  • Bump PolySharp from 1.14.0 to 1.14.1 in /samples by @dependabot in #273
  • [Sample App] Add Microsoft.Extensions.Http.Resilience by @brminnick in #275
  • [Housekeeping] Update NuGet Packages by @brminnick in #277
  • Bump Microsoft.NET.Test.Sdk from 17.9.0 to 17.10.0 in /samples by @dependabot in #282
  • Bump CommunityToolkit.Maui from 7.0.1 to 9.0.0 in /samples by @dependabot in #283
  • Bump NUnit.Analyzers from 4.1.0 to 4.2.0 in /samples by @dependabot in #284
  • Bump CommunityToolkit.Maui from 9.0.0 to 9.0.1 in /samples by @dependabot in #285
  • Bump Microsoft.CodeAnalysis.CSharp from 4.9.2 to 4.10.0 in /samples by @dependabot in #286
  • Add Performance Benchmarks by @brminnick in #287
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #288
  • Add Style<T> Constructor Overload by @brminnick in #289
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #290
  • Bump BenchmarkDotNet from 0.13.12 to 0.14.0 in /samples by @dependabot in #291
  • Bump NUnit3TestAdapter from 4.5.0 to 4.6.0 in /samples by @dependabot in #292
  • Remove Microsoft.Maui.Controls.Compatibility references by @brminnick in #294
  • Bump MauiCommunityToolkitPackageVersion from 9.0.1 to 9.0.2 in /samples by @dependabot in #293
  • Bump NUnit.Analyzers from 4.2.0 to 4.3.0 in /samples by @dependabot in #296
  • Bump BenchmarkDotNet.Diagnostics.Windows from 0.13.12 to 0.14.0 in /samples by @dependabot in #295

Full Changelog: 4.0.0...4.1.0

v4.0.0: .NET 8 is here!

Choose a tag to compare

@jfversluis jfversluis released this 15 Nov 00:47
7ef1cea

What's Changed

  • Publish NuGet artifacts only from Windows build by @jfversluis in #247
  • Bump Microsoft.Extensions.Http.Polly from 7.0.11 to 7.0.12 in /samples by @dependabot in #249
  • Add [GeneratedCode] and [ExcludeFromCodeCoverage] Attributes to SourceGenerators by @brminnick in #251
  • [housekeeping] Automated PR to fix formatting errors by @github-actions in #252
  • Bump Microsoft.Extensions.Http.Polly from 7.0.12 to 7.0.13 in /samples by @dependabot in #253
  • Bump CommunityToolkit.Mvvm from 8.2.1 to 8.2.2 in /samples by @dependabot in #254
  • Bump CommunityToolkit.Maui from 6.0.0 to 6.1.0 in /samples by @dependabot in #255
  • Port to .NET 8.0 by @brminnick in #256
  • Bump NUnit from 3.13.3 to 3.14.0 in /samples by @dependabot in #258
  • Bump Microsoft.Maui.Controls from 8.0.0-rc.2.9511 to 8.0.0-rc.2.9530 in /samples by @dependabot in #259
  • Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 in /samples by @dependabot in #260
  • Ensure RegisterReloadApplicationEventHandler Runs in DEBUG Configuration by @brminnick in #263
  • Update to .NET 8.0 GA by @brminnick in #257
  • Bump Microsoft.Extensions.Http.Polly from 7.0.13 to 8.0.0 in /samples by @dependabot in #264

Full Changelog: 3.3.0...4.0.0