Inheritance: System.Windows.Controls.UserControl
Example #1
0
		/// <summary>
		/// Create all buttons and add its into toolbar. Override this method to create custom buttons
		/// </summary>
		protected override void InitializeButtons()
		{
			var btn = new SearchBar();
			btn.Name = "btnSearchBar";
			btn.CurrentRecordChanged += SearchBar_CurrentRecordChanged;
			btn.NeedSearch += SearchBar_NeedSearch;
			this.Items.Add(btn);
		}
Example #2
0
		private void OnNeedSearch(SearchBar item, string searchText)
		{
			var tssb = item as SearchBar;
			if (tssb == null)
				return;
			StartSearch(tssb, searchText);
		}
Example #3
0
		private void StartSearch(SearchBar sb, string searchText)
		{
			StopSearch();
			if (searchText == "")
				return;
			_search.Start(searchText, sb.FindFlags);
			_foundTextTimer.Start();
		}
Example #4
0
		private void OnCurrentRecordChanged(SearchBar item, int currentRecord)
		{
			ScrollToRecord(currentRecord);
		}