Skip to content

Conditional methods with parameters as actions? #147

@vgist1

Description

@vgist1

Hi @canton7,

Thanks for this awesome library, I have been using it and I just love how simple and powerful it is.

On caliburn you can use methods with parameters for conditions(for reference: https://caliburnmicro.com/documentation/actions#action-parameters), say

public bool CanDoSomething(string name)
{
    return !string.IsNullOrWhiteSpace(name);
}

public void DoSomething(string name)
{
    // do something
}

From what I read on the documentation with Stylet that is not possible with a method or taking a parameter.

I could probably do a hacky approach which would involve binding 2 properties to achieve something close to the above but its no ideal.

Do you have any plans on adding that into Stylet or have I missed something and that is indeed possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions