Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 90 characters in body
Source Link
MVVMLearning
MVVMLearning

Got it working

here is the thing

Command="{Binding Path=DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"

 <ItemsControl DataContext="{Binding}" ItemsSource="{Binding lm}"> Command="{Binding Path=DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" 

so the RelativeSource was the thing I've missed.

if somebody has a good explaination of this, I would be definitely happy.

Got it working

here is the thing

Command="{Binding Path=DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"

so the RelativeSource was the thing I've missed.

if somebody has a good explaination of this, I would be definitely happy.

Got it working

here is the thing

 <ItemsControl DataContext="{Binding}" ItemsSource="{Binding lm}"> Command="{Binding Path=DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" 

so the RelativeSource was the thing I've missed.

if somebody has a good explaination of this, I would be definitely happy.

Source Link
MVVMLearning
MVVMLearning

Got it working

here is the thing

Command="{Binding Path=DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"

so the RelativeSource was the thing I've missed.

if somebody has a good explaination of this, I would be definitely happy.