Click here to Skip to main content
11,577,643 members (23,222 online)
Rate this: bad
good
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 3:04am
Edited 21-Feb-13 6:13am
v2
Comments
Sandeep Mewara at 21-Feb-13 10:22am
   
And what happened when you tried to do it? Where exactly you got stuck?
Ariana Bond at 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 at 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
good
Please Sign up or sign in to vote.

Solution 1

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

Regards.
  Permalink  

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

  Print Answers RSS
0 DamithSL 180
1 OriginalGriff 115
2 Richard MacCutchan 100
3 Abhinav S 90
4 Peter Leow 80
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 681
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 375


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2015
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