Releases: CommunityToolkit/Maui.Markup
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
- 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
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
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
v3.1.0: IValueConverter and BindCommand support is here!
What's Changed
- Add Support for
IValueConverter
in Typed Bindings Extensions by @brminnick in #183 - Add
BindCommand
Support for Typed Bindings Extensions by @brminnick in #184
Full Changelog: 3.0.0...3.1.0
v3.0.0: Introducing Typed Bindings!
Typed Bindings (also known as "Compiled Bindings") revolutionize the way we make bindings using CommunityToolkit.Maui.Markup:
- High Performance (don't require reflection)
- Explicitly Reference Properties and their Types
Learn more
✅ Official Docs
✅ MauiConverter Sample App
// One-way (aka read-only) Binding
new Label()
.Row(Row.Description)
.Bind(Label.TextProperty,
static (StoryModel m) => m.Description)
// Two-way Binding
new Entry()
.Bind(Entry.TextProperty,
static (SettingsViewModel vm) => vm.NumberOfTopStoriesToFetch,
static (SettingsViewModel vm, int text) => vm.NumberOfTopStoriesToFetch = text)
What's Changed
- Use Raw String Literals for Source Generators by @brminnick in #164
- Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1 in /samples by @dependabot in #166
- Bump Microsoft.Extensions.Http.Polly from 7.0.1 to 7.0.2 in /samples by @dependabot in #171
- Renormalize line endings by @Youssef1313 in #173
- Update
Directory.Build.props
to matchCommunityToolkit.Maui
by @Youssef1313 in #174 - Replace BaseTheme with AppStyles by @HobDev in #167
- Treat all warnings as errors in CI by @Youssef1313 in #177
- Improve TextAlignmentExtensionsGenerator by @Youssef1313 in #172
- Extend
.Bind()
to Support TypedBinding by @brminnick in #156
New Contributors
- @Youssef1313 made their first contribution in #173
Full Changelog: 2.1.0...3.0.0