Replies: 2 comments 2 replies
-
|
Alright, it seems that this is not possible then. I'll find another way out. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@LITTOMA sorry I missed this before. The short answer is that in the current release of C# Markup there is no exposed property for the RelativeSource. That said I've added it to the backlog and will try to get to it this coming week. There isn't a reason it's not there other than it was just something that I didn't think to add. In the mean time you could try using ElementName for your binding like: new ItemsControl()
.Name("ItemsControl")
.ItemTemplate<MyDataType>(dataType => new StackPanel()
.Children(
new Button().Content("Press Me")
.Command(x => x.Bind("DataContext.MyCommand").ElementName("ItemsControl"))
)
) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How do I bind a property of a child item in a ItemsControl to a property of the parent's DataContext?
Beta Was this translation helpful? Give feedback.
All reactions