I'm trying to port/adopt my Windows RT app to WIndows10 and I'm trying out the new bindings x:Bind.
So far I'm able to bind to my ViewModel properties and other Viewelements. But now I'm trying to bind the text of a TextBox to a SelectedItem of a GridView.
In classic binding I'm doing it like that.
<TextBox x:Name="tb_textgroup"
Grid.Row="1"
PlaceholderText="Change Groupname"
Text="{Binding UpdateSourceTrigger=PropertyChanged,
ElementName=gv_textgroup,
Mode=TwoWay,Path=SelectedItem.bezeich}"
IsEnabled="{Binding UpdateSourceTrigger=PropertyChanged,
ElementName=gv_textgroup,
Mode=TwoWay,Path=SelectedItem.edit_activated}"
Margin="20,10,20,0"
/>
I was trying it with
- Text="{x:Bind gv_textgroup.SelectedItem.bezeich, Mode=TwoWay}"
- Text="{x:Bind textgroup[gv_textgroup.SelectedIndex].bezeich, Mode=TwoWay}"
- where textgroup is my viewmodelclass with all the elements
But None of it worked... any ideas?
And can someone explain me what to do with "DependencyProperty". I watched the viedo from "build 2015" and have the sample codes. But it's saying nothing to me... I'm quite a newbie...
Many thanks for your help