Releases: CommunityToolkit/Maui.Markup
6.0.1
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
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
- @jBijsterboschNL made their first contribution in #381
Full Changelog: 5.1.0...6.0.0
5.1.0
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!
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
- eg
.BindClickGesture
Removed- Use
.BindTapGesture
instead
- Use
.ClickGesture
Removed- Use
.TapGesture
instead
- Use
- 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
- On macOS, open the Terminal and enter the following command:
- 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!
What's Changed
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
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!
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
v3.3.1
Fix .NET Hot Reload Support
If you've been having trouble using .NET Hot Reload, you have my apologies! It is now fixed in v3.3.1.
Thanks to @lukewire129 for spotting this bug and bringing it to our attention! #261
v3.3.0: Hot Reload support!
You've read that right! The C# Markup extensions now have Hot Reload support!
No more restarting your debugging session to tweak your UI changes. Faster dev cycles, more iterations, faster development!
Everything you need to know to get started can be found in our documentation.
What's Changed
- Add Support for .NET Hot Reload by @brminnick in #232
Housekeeping
- Bump CommunityToolkit.Maui from 5.1.0 to 5.2.0 in /samples by @dependabot in #223
- Bump NUnit3TestAdapter from 4.4.2 to 4.5.0 in /samples by @dependabot in #224
- Bump Microsoft.NET.Test.Sdk from 17.6.0 to 17.6.1 in /samples by @dependabot in #226
- Bump Microsoft.NET.Test.Sdk from 17.6.1 to 17.6.2 in /samples by @dependabot in #227
- Bump Microsoft.Extensions.Http.Polly from 7.0.5 to 7.0.7 in /samples by @dependabot in #228
- [housekeeping] Automated PR to fix formatting errors by @github-actions in #229
- Bump Microsoft.Extensions.Http.Polly from 7.0.7 to 7.0.8 in /samples by @dependabot in #230
- Bump Microsoft.NET.Test.Sdk from 17.6.2 to 17.6.3 in /samples by @dependabot in #231
- Bump Refit.HttpClientFactory from 6.5.1 to 7.0.0 in /samples by @dependabot in #233
- Bump CommunityToolkit.Mvvm from 8.2.0 to 8.2.1 in /samples by @dependabot in #234
- Bump Microsoft.Extensions.Http.Polly from 7.0.8 to 7.0.9 in /samples by @dependabot in #235
- Bump Microsoft.Extensions.Http.Polly from 7.0.9 to 7.0.10 in /samples by @dependabot in #238
- Bump Microsoft.NET.Test.Sdk from 17.6.3 to 17.7.0 in /samples by @dependabot in #237
- Bump CommunityToolkit.Maui from 5.2.0 to 5.3.0 in /samples by @dependabot in #239
- Bump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.1 in /samples by @dependabot in #240
- Bump Microsoft.CodeAnalysis.CSharp from 4.6.0 to 4.7.0 in /samples by @dependabot in #241
- Bump Microsoft.NET.Test.Sdk from 17.7.1 to 17.7.2 in /samples by @dependabot in #242
- Bump Microsoft.Extensions.Http.Polly from 7.0.10 to 7.0.11 in /samples by @dependabot in #244
- Bump CommunityToolkit.Maui from 5.3.0 to 6.0.0 in /samples by @dependabot in #246
Full Changelog: 3.2.0...3.3.0
v3.2.0: AbsoluteLayoutFlags, GestureExtensions typed bindings & TextAlignment SG improvements
What's Changed
- [Housekeeping] Enable
AccelerateBuildsInVisualStudio
by @brminnick in #197 - Do not generate TextAlignment extension if it's already generated by base type by @Youssef1313 in #205
- Add
GesturesExtensions.TypedBindings.cs
by @brminnick in #192 - Update AbsoluteLayout Flags Extensions by @brminnick in #216
Humpty bumpties aka houskeeping aka updated dependencies
- Bump NUnit3TestAdapter from 4.4.0 to 4.4.2 in /samples by @dependabot in #194
- Bump CommunityToolkit.Maui from 4.0.0 to 5.0.0 in /samples by @dependabot in #195
- Bump Newtonsoft.Json from 13.0.2 to 13.0.3 in /samples by @dependabot in #196
- Bump Microsoft.Extensions.Http.Polly from 7.0.3 to 7.0.4 in /samples by @dependabot in #199
- Bump PolySharp from 1.12.1 to 1.13.0 in /samples by @dependabot in #208
- Bump PolySharp from 1.13.0 to 1.13.1 in /samples by @dependabot in #209
- Bump Microsoft.Extensions.Http.Polly from 7.0.4 to 7.0.5 in /samples by @dependabot in #210
- Bump Refit.HttpClientFactory from 6.3.2 to 6.4.1 in /samples by @dependabot in #211
- Bump Refit.HttpClientFactory from 6.4.1 to 6.5.1 in /samples by @dependabot in #212
- Bump CommunityToolkit.Maui from 5.0.0 to 5.1.0 in /samples by @dependabot in #213
- Bump CommunityToolkit.Mvvm from 8.1.0 to 8.2.0 in /samples by @dependabot in #217
- Bump PolySharp from 1.13.1 to 1.13.2 in /samples by @dependabot in #220
- Bump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 in /samples by @dependabot in #219
- Bump Microsoft.CodeAnalysis.CSharp from 4.5.0 to 4.6.0 in /samples by @dependabot in #221
- Bump coverlet.collector from 3.2.0 to 6.0.0 in /samples by @dependabot in #222
Full Changelog: 3.1.0...3.2.0