I noticed that if I move my WPF window through code, I will only see that changes when the window refreshes (if I minimize and then maximize it).
Is it possible to refresh the GUI of a WPF on demand?
EDIT: I'm actually trying to make this window follow another window.
So I'm hooking to the other window's events:
m_wndParent = parent;
this.Owner = m_wndParent;
m_wndParent.SizeChanged += ParentSizeChanged;
m_wndParent.LayoutUpdated += ParentLocationChanged;
and then I change my window's position:
private void ParentLocationChanged(object sender, EventArgs e)
{
Window parent = sender as Window;
this.Top = parent.Top;
this.Left = parent.Left;
this.UpdateLayout();
}