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?
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).
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.
Re: Updating an element in another wpf window
That's great. Have you researched the mv-vm pattern as I've suggested?
Re: Updating an element in another wpf window
Ok, looks like I have a lot of reading ahead of me.