|
-
May 2nd, 2011, 11:45 AM
#1
Updating an element in another wpf window
Hello,
If I have the following function in my class.
Code:
public string setTextblock1
{
set
{
this.textblock1.Text = value;
}
}
And I set it's value before calling ShowDialog for this class then I can see the new selected value.
However if I call it after the dialog is already open the value does not update. Is there a refresh of some sort I need to do?
-
May 2nd, 2011, 12:12 PM
#2
Re: Updating an element in another wpf window
You need to put some deep thought into why you need to do this.
Also, check out the mv-vm design patterns. UI objects should not talk to other UI objects (on the form level). UI objects should only connect to view-model objects (and vm objects connect to each other).
-
May 2nd, 2011, 01:27 PM
#3
Re: Updating an element in another wpf window
Well the user is selecting to restore a database. A restore Window opens and they restore their new database. The restore window then needs to close and pass the new database name to the main window's search box and refresh the list of databases.
-
May 2nd, 2011, 02:52 PM
#4
Re: Updating an element in another wpf window
That's great. Have you researched the mv-vm pattern as I've suggested?
-
May 2nd, 2011, 05:01 PM
#5
Re: Updating an element in another wpf window
Ok, looks like I have a lot of reading ahead of me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|