Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

Cascading BindingContext #53

@hillin

Description

@hillin

Is there a way to have cascading BindingContext?
Say we have two components:

class ParentComponent: MvvmComponentBase<ParentViewModel> {
    ChildComponent Child;
}
class ChildComponent: MvvmComponentBase<ChildViewModel> { }
class ParentViewModel: ViewModelBase {
    ChildViewModel Child { get; }
}
class ChildViewModel: ViewModelBase {}

Now I would like to bind the BindingContext of the Child component in the ParentComponent to the Child property of the ParentViewModel instance, which is automatically resolved for the ParentComponent. However it seems the view model is always resolved in the component's constructor via DI, and we don't have a public BindingContext property to override.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureNew feature or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions