Skip to content

Enable WPF to play well with Dependency Injection #6434

@raffaeler

Description

@raffaeler

I created my own framework to use Dependency Injection in WPF. This is done using the ASP.NET infrastructure.
I can inject pages, viewmodels and many other types, but the WPF infrastructure does not allow to inject, for example, converters or markup extensions.

Markup extensions provide an IServiceProvider which we can't access elsewhere.

This issue is about a two-phase request:

  • Step 1 (short-term): Ability to provide to WPF a user-provided IServiceProvider, so that I can retrieve my objects within a markup extension.
  • Step 2 (long-term): Embrace the ASP.NET DI infrastructure so that we can access configurations within converters, controls, behaviors, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement RequestedProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions