public static IObservable <Window> WhenMainFormVisible(this IXAFAppWinAPI api) => api.Application.WhenWindowCreated().When(TemplateContext.ApplicationWindow) .SelectMany(window => window.WhenTemplateChanged().Select(window1 => window1.Template).StartWith(window.Template).WhenNotDefault() .SelectMany(template => template.WhenWindowsForm().When("VisibleChanged")).To(window));
public static IObservable <Window> WhenMainFormShown(this IXAFAppWinAPI api) => api.Application.WhenWindowCreated().When(TemplateContext.ApplicationWindow) .SelectMany(window => window.Template.WhenWindowsForm().When("Shown").To(window));