private void ActivateSearchUi() { if (_searchWindow == null) { _searchWindow = new SearchWindow(_appContext); } if (_searchCountDown == null) { _searchCountDown = new Timer(500) { AutoReset = false }; _searchCountDown.Elapsed += (o, args) => ProcessSearch(); } SearchRosterList.ContactsView.View.Refresh(); DashboardData.SearchContactsVisibility = 0; ActiveContent.Content = _searchWindow; _searchWindow.SetAsMain(this); }