In the markup there are several elements of the same type that use the same command.
Example:
<Border> <Border.InputBindings> <MouseBinding MouseAction="LeftDoubleClick" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Popup.HideCommand}"/> </Border.InputBindings> </Border> ... <Button Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Popup.HideCommand}" /> Is it possible to bind a command to resources and bind to one object already?