Solved

Bind a textblock to the value of a textbox

Posted on 2010-08-15
1
818 Views
Last Modified: 2012-08-14
I have a textblock

<TextBlock Height="43" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock2" Text="TheCompany" VerticalAlignment="Top" Width="818" TextAlignment="Center" FontSize="20" Foreground="#FF767C96" FontWeight="Normal" FontStyle="Normal" FontStretch="Normal" FontFamily="Georgia" />

And I want to have it bound to the value of a textbox

<TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="6,2,0,0" Name="textBox1" VerticalAlignment="Top" Width="253" />

How do I do that? Both these controls are in the same grid object.

Thank you
0
Comment
Question by:KiasChaos83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
KiasChaos83 earned 0 total points
ID: 33442727
I figured it out..

Adding the following attribute to the textblock made it work

Text="{Binding ElementName=txtPartnerName, Path=Text}"
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question