WPF Adding textblock on an item and binding it to a textbox

后端 未结 2 1899
灰色年华
灰色年华 2021-01-23 11:41

I have a diagram designer program and I want to add texts to shapes (these are path objects) when user right clicks to a shape and writes shape name in the property window. I ad

2条回答
  •  长情又很酷
    2021-01-23 12:01

    Bind the selected shape's datacontext to a property on the window or controller called SelectedItem, then bind the property window's datacontext to SelectedItem.

提交回复
热议问题