Skip to content

Command binding does not work with a custom dependency property of ICommand type. #17

@dominkomin

Description

@dominkomin

When I developed a custom user control that exposes a custom dependency property of ICommand type the exception is shown saying "there is no ID for given dependency property".

[DependencyProperty( Properties.OpenNotificationsCommand)]
public ICommand OpenNotificationsCommand { get; set; }

Maybe it is caused by the aspect [WpfControl( typeof( Properties ) )] which does not allow to expose commands ID's (Property of a command type is not accepted?).

Possible workaround solution is to use a control template and then template bindings. In that case exception is not thrown.

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