I have a user control like;
<Grid x:Name="LayoutRoot">
<StackPanel>
<Grid Height="34" Width="92" Background="#FF000000">
<TextBox Text="{Binding Path=AbilityValue, Mode=TwoWay}" MaxLength="2" TextChanged="TextBox_TextChanged" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="-5,5,0,5" Width="35" BorderBrush="#FF000000" TextAlignment="Center"/>
<Grid x:Name="grdTitles" HorizontalAlignment="Right" Margin="0,5,20,5" VerticalAlignment="Stretch" Width="Auto" >
<TextBlock Text="{Binding Path=Title}" TextWrapping="NoWrap" Margin="8,0,0,0" VerticalAlignment="Top" Width="Auto" Foreground="#FFFFFFFF" d:LayoutOverrides="Width" HorizontalAlignment="Right" FontFamily="Arial"/>
<TextBlock Text="{Binding Path=SubTitle}" VerticalAlignment="Bottom" FontFamily="Arial" FontSize="8" Foreground="#FFFFFFFF" TextWrapping="NoWrap" d:LayoutOverrides="Width" HorizontalAlignment="Right"/>
</Grid>
</Grid>
</StackPanel>
</Grid>
I'm trying to get the AbilityValue to bind to the Character.Strength
I'm binding to the user control on my main page like this;
<Manager:AbilityControl x:Name="abiStr" Title="STR" SubTitle="Strength" AbilityValue="{Binding Path=Character.Strength, Mode=TwoWay}" Height="Auto" Width="Auto" Margin="0,0,0,5"/>
problem is, I'm not sure how to tell the textbox on the user control to bind to the required property on the viewmodel on the main page. I want to be able to have 6 of these on the page so it has to be set from the outside otherwise I can only bind it to a single property and I might as well not use a user control. (lose the reuse)
hope that makes sense. cheers, Stephen