private void TryShown(ListTabItem currentSelectedItem) { var l = currentSelectedItem.Content as ITabLifetime; l?.Shown(); var f = currentSelectedItem.Content as FrameworkElement; if (f != null && f != f.DataContext) { l = f.DataContext as ITabLifetime; l?.Shown(); } TabShown?.Invoke(this, new MsgEventArgs <ListTabItem>() { Parameter = currentSelectedItem }); }
protected virtual void OnTabShown(EventArgs e) { TabShown?.Invoke(this, e); }