question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Proposal] Further enhance typed binding support by adding BindCommand

See original GitHub issue

Feature name

Further enhance typed binding support by adding BindCommand

Link to discussion

n/a

Progress tracker

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:closed
  • Created 8 months ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
brminnickcommented, Feb 5, 2023

static is a recommended because it gives a performance boost to anonymous methods: https://paulsebastian.codes/static-anonymous-functions-with-c-9-quick-overview

You don’t have to use static anonymous methods, but it is recommended.

0reactions
msftbot[bot]commented, Feb 26, 2023

Reopening Proposal.

Only Proposals moved to the Closed Project Column and Completed Project Column can be closed.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found