private void SearchTextBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { SearchResultsListBox.Focus(); } }
private void ClearSearchButton_Click(object sender, EventArgs e) { SearchResultsListBox.ResetText(); SearchInputTextBox.Visible = false; SearchButton.Visible = false; SearchResultsListBox.Visible = false; ClearSearchButton.Visible = false; }
private void SetSearchResultsListBoxEnabled(bool enabled) { MethodInvoker mi = new MethodInvoker(() => { SearchResultsListBox.Enabled = enabled; }); if (SearchResultsListBox.InvokeRequired) { SearchResultsListBox.Invoke(mi); } else { mi.Invoke(); } }
protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom) { if (toOrFrom != null && toOrFrom.OriginalString.StartsWith("/Pages/Browse/")) { if (animationType == AnimationType.NavigateForwardOut || animationType == AnimationType.NavigateBackwardIn) { if (_lastTappedItem != null) { var contentPresenter = SearchResultsListBox.GetContentPresenterForItem(_lastTappedItem); if (contentPresenter != null) { return(GetContinuumAnimation(contentPresenter, animationType)); } } } } return(base.GetAnimation(animationType, toOrFrom)); }
private void SearchResultsListAppend(String[] titles) { MethodInvoker mi = new MethodInvoker(() => { lock (_ListBoxLock) { SearchResultsListBox.Items.AddRange(titles); } }); if (SearchResultsListBox.InvokeRequired) { SearchResultsListBox.Invoke(mi); } else { mi.Invoke(); } }
private void SearchResultsListClear() { MethodInvoker mi = new MethodInvoker(() => { lock (_ListBoxLock) { SearchResultsListBox.Items.Clear(); } }); if (SearchResultsListBox.InvokeRequired) { SearchResultsListBox.Invoke(mi); } else { mi.Invoke(); } }