P
Phil Johnson
Hello,
My first attempt to bind a 'detail' form to the properties on an object and
the binding is not working.
I have the following grid:
<Grid x:Name="MainGrid">
<StackPanel FlowDirection="LeftToRight">
<TextBlock Foreground="#FFFFFFFF">First name:</TextBlock>
<TextBox Text="{Binding Path=UserName}"></TextBox>
</StackPanel>
</Grid>
And the code behind on the load for the form runs the following... its
definitely executing and the UserName property of _user is set to "Phillip",
but nothing displays in the text box detailed above!
this.MainGrid.DataContext = _user;
Is there some obvious properties or calls I need to set or make to get a
simple binding app like this to work? Or am I missing something else?
Thanks.
--
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
My first attempt to bind a 'detail' form to the properties on an object and
the binding is not working.
I have the following grid:
<Grid x:Name="MainGrid">
<StackPanel FlowDirection="LeftToRight">
<TextBlock Foreground="#FFFFFFFF">First name:</TextBlock>
<TextBox Text="{Binding Path=UserName}"></TextBox>
</StackPanel>
</Grid>
And the code behind on the load for the form runs the following... its
definitely executing and the UserName property of _user is set to "Phillip",
but nothing displays in the text box detailed above!
this.MainGrid.DataContext = _user;
Is there some obvious properties or calls I need to set or make to get a
simple binding app like this to work? Or am I missing something else?
Thanks.
--
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com