1 Replies - 7154 Views - Last Post: 21 September 2012 - 05:47 AM Rate Topic: -----

#1 Bertdecode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 06-September 12

Update Window Content through UserControl

Posted 20 September 2012 - 07:53 PM

This is the problem that i am stock now, i have textbox in a WPF Window form and i want to change the text of it through the button in UserControl.

here is my code
// name of my WPF window
SWindow sw=new SWindow();
//name of textbox in WPF Window
sw.textToCange="Changed";



the above code is under mouseclick event of a button in UserControl.
Is This A Good Question/Topic? 0
  • +

Replies To: Update Window Content through UserControl

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5432
  • View blog
  • Posts: 11,643
  • Joined: 02-June 10

Re: Update Window Content through UserControl

Posted 21 September 2012 - 05:47 AM

Why are you making a new window?

Are you meaning to make a NEW window, then change that window's textbox?
Or are you meaning to change the text of your current window's textbox.
What exactly *is* the problem? Text not changing or window not showing? Because you are making a new window but haven't directed it to be shown.


// name of my WPF window
SWindow sw=new SWindow();
sw.Show();
//name of textbox in WPF Window
sw.textToCange="Changed";

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1