Click here to Skip to main content
12,688,944 members (32,454 online)
Rate this:
Please Sign up or sign in to vote.
Hi ,

I want to synchronize two textboxes which are in different user controls of silverlight , i want that , the moment i start writing something in one textbox it should also appear in second textbox.

Problem with binding controls,

public static readonly DependencyProperty InnerTextProperty = DependencyProperty.Register("InnerText",
    typeof(string), typeof(string), new PropertyMetadata(false, OnTextInput));

public bool InnerText
    get { return (bool)GetValue(InnerTextProperty); }
    set { SetValue(InnerTextProperty, value); }
private static void OnTextInput(DependencyObject obj, DependencyPropertyChangedEventArgs e)
    CheckEmailExistence c = obj as CheckEmailExistence;
    //TextBox c = obj as TextBox;
    //TextBlock y = obj as TextBlock;
    if (c != null)

        //c.Text = (string)e.NewValue;
        c.lblMsg.Content = (string)e.NewValue;
        //y.Text = (string)e.NewValue;


Waiting for replies...
Posted 21-Feb-13 4:04am
Updated 21-Feb-13 7:13am
Sandeep Mewara 21-Feb-13 10:22am
And what happened when you tried to do it? Where exactly you got stuck?
Ariana Bond 21-Feb-13 11:42am
when i am trying to bind them , page is not loading.There is some sort of problem while binding controls.
Sandeep Mewara 21-Feb-13 11:47am
Then you should update the question with your implementation such that someone can point the mistake.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The same question was answer here: StackOverflow Forum[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170113.4 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100