Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bind a textblock to the value of a textbox

Posted on 2010-08-15
1
Medium Priority
?
819 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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