private void setShadowPosition() { if (shadow != null) { shadow.SetPosition(); // running this on a short delay fixes changing dpi on multiple displays var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.1) }; timer.Start(); timer.Tick += (sender1, args) => { if (shadow != null) { shadow.SetPosition(); } timer.Stop(); }; } }
private void setShadowPosition() { shadow?.SetPosition(); }