-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add search capability over message headers
- Loading branch information
Showing
14 changed files
with
1,114 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//Copied from www.codeproject.com/Articles/101975/Building-a-Search-Text-Box-Control-with-WPF | ||
//and modified to add next and previous buttons, and improve icons and general behaviour | ||
//Licensed under The Code Project Open License (CPOL) | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
|
||
namespace SearchTextBox | ||
{ | ||
|
||
public class ListBoxEx : ListBox | ||
{ | ||
public enum ItemStyles{ | ||
NormalStyle, | ||
CheckBoxStyle, | ||
RadioBoxStyle | ||
} | ||
private ItemStyles m_extendedStyle; | ||
|
||
public ItemStyles ExtendedStyle | ||
{ | ||
get { return m_extendedStyle; } | ||
set { | ||
m_extendedStyle = value; | ||
|
||
// load resources | ||
ResourceDictionary resDict = new ResourceDictionary(); | ||
resDict.Source = new Uri("/Themes/ListBoxEx.xaml", UriKind.Relative); | ||
if (resDict.Source == null) | ||
throw new SystemException(); | ||
|
||
switch (value) | ||
{ | ||
case ItemStyles.NormalStyle: | ||
this.Style = (Style)resDict["NormalListBox"]; | ||
break; | ||
case ItemStyles.CheckBoxStyle: | ||
this.Style = (Style)resDict["CheckListBox"]; | ||
break; | ||
case ItemStyles.RadioBoxStyle: | ||
this.Style = (Style)resDict["RadioListBox"]; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
static ListBoxEx() | ||
{ | ||
DefaultStyleKeyProperty.OverrideMetadata(typeof(ListBoxEx), new FrameworkPropertyMetadata(typeof(ListBoxEx))); | ||
} | ||
|
||
public ListBoxEx(ItemStyles style) | ||
: base() | ||
{ | ||
ExtendedStyle = style; | ||
} | ||
|
||
public ListBoxEx(): base(){ | ||
ExtendedStyle = ItemStyles.NormalStyle; | ||
} | ||
|
||
|
||
} | ||
} | ||
|
Oops, something went wrong.