How to Bind Databse value to TexBox in wpf MVVM Entity FrameWork

Total Post:2

Points:14
WPF 
C#
 879  View(s)
Ratings:
Rate this:
my xaml file is 
<Label Name="lblCNReports" Content="1.  Company-Name-Reports" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="67"  Width="158"/>
            <TextBox Name="txtCNReports" MaxLength="100" Width="190" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="67" TabIndex="1"  MinHeight="15">
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
            <Label Name="lblCNDisplay" Content="2.  Company-Name-Display" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="94" />
            <TextBox Name="txtCNDisplay"MaxLength="200" Width="190" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="94" TabIndex="2"   MinHeight="15">
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
            <Label Name="lblAddress1" Content="3.  Address-1" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="22" Canvas.Top="121"/>
            <TextBox Name="txtAddress1"  MaxLength="150" Width="170" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="185" Canvas.Top="121"  TabIndex="3"  MinHeight="15" >
                <i:Interaction.Behaviors>
                    <vmHelper:KeyUpWithArgsBehavior KeyUpCommand="{Binding KeyUPCommand}" ></vmHelper:KeyUpWithArgsBehavior>
                </i:Interaction.Behaviors>
            </TextBox>
         i want to add database value to textbox.how it is possible

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!