private void tbSearch_TextChanged(object sender, TextChangedEventArgs e) { DependencyObject ucParent = this.Parent; while (!(ucParent is UserControl)) { ucParent = LogicalTreeHelper.GetParent(ucParent); } TitleDLAuto tabTDL = (TitleDLAuto)ucParent; tabTDL.filterTable(); }
private void lbCatList_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (changed) { DependencyObject ucParent = this.Parent; while (!(ucParent is UserControl)) { ucParent = LogicalTreeHelper.GetParent(ucParent); } // TitleDatabaseViewer if (ucParent.GetType().Equals(typeof(TitleDatabaseViewer))) { TitleDatabaseViewer tabTDV = (TitleDatabaseViewer)ucParent; tabTDV.ucTable.filterTable(); } // Ticket Manager if (ucParent.GetType().Equals(typeof(TicketManager))) { TicketManager tabTM = (TicketManager)ucParent; tabTM.filterTable(); } // Title Downloader Auto if (ucParent.GetType().Equals(typeof(TitleDLAuto))) { TitleDLAuto tabTDL = (TitleDLAuto)ucParent; tabTDL.filterTable(); } } else { changed = true; } }