[Proposal] Further enhance typed binding support by adding BindCommand
See original GitHub issueFeature name
Further enhance typed binding support by adding BindCommand
Link to discussion
n/a
Progress tracker
- Android Implementation
- iOS Implementation
- MacCatalyst Implementation
- Windows Implementation
- Tizen Implementation
- Unit Tests
- Samples
- Documentation: https://github.com/MicrosoftDocs/CommunityToolkit/pull/226/files
Summary
The work carried out in #155 didn’t bring full typed binding support up to par with the existing binding support. We want to add in the BindCommand
implementation to match the old binding functionality.
Motivation
Quicker bindings means quicker apps.
Detailed Design
public static TBindable BindCommand<TBindable, TBindingContext, TSource>(
this TBindable bindable,
Func<TBindingContext, TSource> getter,
TSource? source = null,
string? parameterPath = Binding.SelfPath,
object? parameterSource = null) where TBindable : BindableObject
{
...
}
Usage Syntax
new Button().BindCommand(static (ViewModel vm) => vm.SubmitCommand);
Drawbacks
No response
Alternatives
No response
Unresolved Questions
No response
Issue Analytics
- State:
- Created 8 months ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
CommunityToolkit/Maui.Markup - [Proposal] Typed Bindings
Typed Bindings are used by XAML Compiled Bindings to improve performance and ensure Type safety. This Proposal extends the .Bind() extension ...
Read more >allow variables in the `RUN --mount=type=bind` values · ...
When I define an argument (ARG) or an environment variable (ENV) and then try to use it in the RUN --mount=type=bind,... command, ...
Read more >BIND command
Supports the binding of packages with bind options that are supported by the target server, but that are not predefined in the BIND...
Read more >SIP Bind control command getting error "There are active ...
Hi,. i have an Telephony setup with CME 2921 router with 15.X software version. I need to configure the SIP Bind command under...
Read more >Xamarin Community Toolkit C# Markup
This example creates a gesture recognizer of the specified type, and adds it to the Label . The Bind*Gesture extension methods offer the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
static
is a recommended because it gives a performance boost to anonymous methods: https://paulsebastian.codes/static-anonymous-functions-with-c-9-quick-overviewYou don’t have to use static anonymous methods, but it is recommended.
Reopening Proposal.
Only Proposals moved to the
Closed
Project Column andCompleted
Project Column can be closed.