public void Post(Window targetWindow, bool animated = true) { window = targetWindow; if (window != null) { if (animated) { BeforePosting?.Invoke(this, null); if (CustomAnimation == null) { defaultShowAnimation(); } else { CustomAnimation.ShowAnimation(this); } window.AddLayer(layer); layer.RaiseToTop(); AfterPosting?.Invoke(this, null); } else { window.AddLayer(layer); layer.RaiseToTop(); } } }