How do i bind two TextBox objects to a System.Windows.Size struct? The binding only has to work in this direction:
(textBox1.Text + textBox2.Text) => (Size)
After a user inserts the width and height in the TextBoxes on the UI the Size object should be created.
XAML:
<TextBox Name="textBox_Width" Text="{Binding ???}" />
<TextBox Name="textBox_Height" Text="{Binding ???}" />
C#:
private Size size
{
get;
set;
}
Is there an easy way to do this?
Edit: Size is a struct! Therefore "someObject.Size.Width = 123" does not work. I need to call the Size-Constructor and set someObject.Size = newSize