I'm trying to bind 3 TextBox
es (as a first step, but really 3 DataGrid
columns) to components of a Vector3D property. Notice, though, that Vector3D
is a struct and is thus value-type.
The idea for the binding is to be able to edit a Vector3D
property, such that each vector component X, Y, Z is individually editable.
The following does not work:
<TextBox Text="{Binding Position.X}"/>
<TextBox Text="{Binding Position.Y}"/>
<TextBox Text="{Binding Position.Z}"/>
Is this possible without rewriting my models to wrap a Vector3D struct with a class?