refactor LeftMainContent control of demo

This commit is contained in:
NaBian 2019-11-21 21:25:44 +08:00
parent 3a203896a1
commit 13ad023119
17 changed files with 345 additions and 963 deletions

View File

@ -43,6 +43,8 @@
<a href="https://github.com/maplewei" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/13778095?s=400&v=4"></a>
<a href="https://github.com/sunshang-hl" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/34593206?s=400&v=4"></a>
<a href="https://github.com/yangkang326" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/51224259?s=400&v=4"></a>
<a href="https://github.com/zmrbak" target="_blank"><img width="64px" src="https://avatars3.githubusercontent.com/u/7257543?s=400&v=4"></a>
<a href="https://github.com/AFei19911012" target="_blank"><img width="64px" src="https://avatars0.githubusercontent.com/u/31465314?s=400&v=4"></a>
## Special thanks to

View File

@ -1,96 +1,105 @@
{
"style": [
[ "Brush", "BrushDemoCtl", "Brush_16x", "" ],
[ "Button", "ButtonDemoCtl", "ButtonClick_16x", "" ],
[ "RepeatButton", "RepeatButtonDemoCtl", "RepeatButton_16x", "" ],
[ "ToggleButton", "ToggleButtonDemoCtl", "Toggle_16x", "" ],
[ "RadioButton", "RadioButtonDemoCtl", "RadioButton_16x", "" ],
[ "CheckBox", "CheckBoxDemoCtl", "CheckBox_16x", "" ],
[ "ScrollViewer", "NativeScrollViewerDemoCtl", "ScrollBox_16x", "" ],
[ "Slider", "SliderDemoCtl", "Slider_16x", "" ],
[ "TextBlock", "TextBlockDemoCtl", "TextBlock_16x", "" ],
[ "TextBox", "NativeTextBoxDemoCtl", "TextBox_16x", "" ],
[ "ComboBox", "NativeComboBoxDemoCtl", "ComboBox_16x", "" ],
[ "PasswordBox", "NativePasswordBoxDemoCtl", "PasswordBox_16x", "" ],
[ "Expander", "ExpanderDemoCtl", "Expander_16x", "" ],
[ "ProgressBar", "NativeProgressBarDemoCtl", "ProgressBar_16x", "" ],
[ "Calendar", "CalendarDemoCtl", "Calendar_16x", "" ],
[ "DatePicker", "NativeDatePickerDemoCtl", "DatePicker_16x", "" ],
[ "TabControl", "NativeTabControlDemoCtl", "TabPage_16x", "" ],
[ "DataGrid", "DataGridDemoCtl", "DataGrid_16x", "" ],
[ "TreeView", "TreeViewDemoCtl", "TreeView_16x", "" ],
[ "ListBox", "ListBoxDemoCtl", "ListBox_16x", "" ],
[ "ListView", "ListViewDemoCtl", "ListView_16x", "" ],
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
[ "Label", "LabelDemoCtl", "Label_16x", "" ]
],
"control": [
[ "FloatingBlock", "FloatingBlockDemoCtl", "thumbs_up", "1" ],
[ "ImageBlock", "ImageBlockDemoCtl", "ImageStack_16x", "" ],
[ "Magnifier", "MagnifierDemoCtl", "Search_16x", "" ],
[ "Gravatar", "GravatarDemoCtl", "User_16x", "" ],
[ "Badge", "BadgeDemoCtl", "DotLarge_16x", "" ],
[ "GotoTop", "GotoTopDemoCtl", "GoToTop_16x", "" ],
[ "SplitButton", "SplitButtonDemoCtl", "SplitButton_16x", "1" ],
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "1" ],
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
[ "DatePicker", "DatePickerDemoCtl", "DatePicker_16x", "" ],
[ "Clock", "ClockDemoCtl", "Time_color_16x", "" ],
[ "TimePicker", "TimePickerDemoCtl", "TimePicker_16x", "" ],
[ "CalendarWithClock", "CalendarWithClockDemoCtl", "Calendar_16x", "" ],
[ "DateTimePicker", "DateTimePickerDemoCtl", "DatePicker_16x", "" ],
[ "Transfer", "TransferDemoCtl", "Transfer_16x", "" ],
[ "FlipClock", "FlipClockDemoCtl", "FlipVertical_16x", "" ],
[ "Rate", "RateDemoCtl", "Star", "" ],
[ "Shield", "ShieldDemoCtl", "Shield_16x", "" ],
[ "SearchBar", "SearchBarDemoCtl", "Search_16x", "" ],
[ "Tag", "TagDemoCtl", "Tag_16x", "" ],
[ "GifImage", "GifImageDemoCtl", "Animation_16x", "" ],
[ "OutlineText", "OutlineTextDemoCtl", "TextBlock_16x", "" ],
[ "RunningBlock", "RunningBlockDemoCtl", "Dynamic_16x", "" ],
[ "Card", "CardDemoCtl", "VSO_Card_16x", "" ],
[ "Divider", "DividerDemoCtl", "DottedSplitter_16x", "1" ],
[ "CirclePanel", "CirclePanelDemoCtl", "ColorWheel_16x", "" ],
[ "Grid", "GridDemoCtl", "GridPane_16x", "" ],
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "1" ],
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
[ "StepBar", "StepBarDemoCtl", "Flow_16x", "" ],
[ "Growl", "GrowlDemoCtl", "Message_16x", "" ],
[ "Loading", "LoadingDemoCtl", "Loading_Blue_16x", "" ],
[ "ImageBrowser", "ImageBrowserDemoCtl", "ImageBrowser_16x", "" ],
[ "ColorPicker", "ColorPickerDemoCtl", "ColorPalette_16x", "" ],
[ "Carousel", "CarouselDemoCtl", "Carousel_16x", "" ],
[ "CompareSlider", "CompareSliderDemoCtl", "SplitterControl_16x", "" ],
[ "PreviewSlider", "PreviewSliderDemoCtl", "HoverMenu_16x", "" ],
[ "RangeSlider", "RangeSliderDemoCtl", "brackets_Square_16xLG", "" ],
[ "TimeBar", "TimeBarDemoCtl", "Timeline_16x", "" ],
[ "Pagination", "PaginationDemoCtl", "Paginator_16x", "" ],
[ "AnimationPath", "AnimationPathDemoCtl", "Path_16x", "" ],
[ "TabControl", "TabControlDemoCtl", "TabPage_16x", "" ],
[ "SideMenu", "SideMenuDemoCtl", "MainMenuControl_16x", "" ],
[ "ScrollViewer", "ScrollViewerDemoCtl", "ScrollBox_16x", "" ],
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
],
"tool": [
[ "HatchBrushGenerator", "HatchBrushGeneratorDemoCtl", "DataGenerator_16x", "" ],
[ "Morphing Animation", "GeometryAnimationDemoCtl", "Animation_16x", "" ]
]
}
[
{
"title": "Styles",
"demoItemList": [
[ "Brush", "BrushDemoCtl", "Brush_16x", "" ],
[ "Button", "ButtonDemoCtl", "ButtonClick_16x", "" ],
[ "RepeatButton", "RepeatButtonDemoCtl", "RepeatButton_16x", "" ],
[ "ToggleButton", "ToggleButtonDemoCtl", "Toggle_16x", "" ],
[ "RadioButton", "RadioButtonDemoCtl", "RadioButton_16x", "" ],
[ "CheckBox", "CheckBoxDemoCtl", "CheckBox_16x", "" ],
[ "ScrollViewer", "NativeScrollViewerDemoCtl", "ScrollBox_16x", "" ],
[ "Slider", "SliderDemoCtl", "Slider_16x", "" ],
[ "TextBlock", "TextBlockDemoCtl", "TextBlock_16x", "" ],
[ "TextBox", "NativeTextBoxDemoCtl", "TextBox_16x", "" ],
[ "ComboBox", "NativeComboBoxDemoCtl", "ComboBox_16x", "" ],
[ "PasswordBox", "NativePasswordBoxDemoCtl", "PasswordBox_16x", "" ],
[ "Expander", "ExpanderDemoCtl", "Expander_16x", "" ],
[ "ProgressBar", "NativeProgressBarDemoCtl", "ProgressBar_16x", "" ],
[ "Calendar", "CalendarDemoCtl", "Calendar_16x", "" ],
[ "DatePicker", "NativeDatePickerDemoCtl", "DatePicker_16x", "" ],
[ "TabControl", "NativeTabControlDemoCtl", "TabPage_16x", "" ],
[ "DataGrid", "DataGridDemoCtl", "DataGrid_16x", "" ],
[ "TreeView", "TreeViewDemoCtl", "TreeView_16x", "" ],
[ "ListBox", "ListBoxDemoCtl", "ListBox_16x", "" ],
[ "ListView", "ListViewDemoCtl", "ListView_16x", "" ],
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
[ "Label", "LabelDemoCtl", "Label_16x", "" ]
]
},
{
"title": "Controls",
"demoItemList": [
[ "FloatingBlock", "FloatingBlockDemoCtl", "thumbs_up", "1" ],
[ "ImageBlock", "ImageBlockDemoCtl", "ImageStack_16x", "" ],
[ "Magnifier", "MagnifierDemoCtl", "Search_16x", "" ],
[ "Gravatar", "GravatarDemoCtl", "User_16x", "" ],
[ "Badge", "BadgeDemoCtl", "DotLarge_16x", "" ],
[ "GotoTop", "GotoTopDemoCtl", "GoToTop_16x", "" ],
[ "SplitButton", "SplitButtonDemoCtl", "SplitButton_16x", "1" ],
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "1" ],
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
[ "DatePicker", "DatePickerDemoCtl", "DatePicker_16x", "" ],
[ "Clock", "ClockDemoCtl", "Time_color_16x", "" ],
[ "TimePicker", "TimePickerDemoCtl", "TimePicker_16x", "" ],
[ "CalendarWithClock", "CalendarWithClockDemoCtl", "Calendar_16x", "" ],
[ "DateTimePicker", "DateTimePickerDemoCtl", "DatePicker_16x", "" ],
[ "Transfer", "TransferDemoCtl", "Transfer_16x", "" ],
[ "FlipClock", "FlipClockDemoCtl", "FlipVertical_16x", "" ],
[ "Rate", "RateDemoCtl", "Star", "" ],
[ "Shield", "ShieldDemoCtl", "Shield_16x", "" ],
[ "SearchBar", "SearchBarDemoCtl", "Search_16x", "" ],
[ "Tag", "TagDemoCtl", "Tag_16x", "" ],
[ "GifImage", "GifImageDemoCtl", "Animation_16x", "" ],
[ "OutlineText", "OutlineTextDemoCtl", "TextBlock_16x", "" ],
[ "RunningBlock", "RunningBlockDemoCtl", "Dynamic_16x", "" ],
[ "Card", "CardDemoCtl", "VSO_Card_16x", "" ],
[ "Divider", "DividerDemoCtl", "DottedSplitter_16x", "1" ],
[ "CirclePanel", "CirclePanelDemoCtl", "ColorWheel_16x", "" ],
[ "Grid", "GridDemoCtl", "GridPane_16x", "" ],
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "1" ],
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
[ "StepBar", "StepBarDemoCtl", "Flow_16x", "" ],
[ "Growl", "GrowlDemoCtl", "Message_16x", "" ],
[ "Loading", "LoadingDemoCtl", "Loading_Blue_16x", "" ],
[ "ImageBrowser", "ImageBrowserDemoCtl", "ImageBrowser_16x", "" ],
[ "ColorPicker", "ColorPickerDemoCtl", "ColorPalette_16x", "" ],
[ "Carousel", "CarouselDemoCtl", "Carousel_16x", "" ],
[ "CompareSlider", "CompareSliderDemoCtl", "SplitterControl_16x", "" ],
[ "PreviewSlider", "PreviewSliderDemoCtl", "HoverMenu_16x", "" ],
[ "RangeSlider", "RangeSliderDemoCtl", "brackets_Square_16xLG", "" ],
[ "TimeBar", "TimeBarDemoCtl", "Timeline_16x", "" ],
[ "Pagination", "PaginationDemoCtl", "Paginator_16x", "" ],
[ "AnimationPath", "AnimationPathDemoCtl", "Path_16x", "" ],
[ "TabControl", "TabControlDemoCtl", "TabPage_16x", "" ],
[ "SideMenu", "SideMenuDemoCtl", "MainMenuControl_16x", "" ],
[ "ScrollViewer", "ScrollViewerDemoCtl", "ScrollBox_16x", "" ],
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
]
},
{
"title": "Tools",
"demoItemList": [
[ "HatchBrushGenerator", "HatchBrushGeneratorDemoCtl", "DataGenerator_16x", "" ],
[ "Morphing Animation", "GeometryAnimationDemoCtl", "Animation_16x", "" ]
]
}
]

View File

@ -2,195 +2,7 @@
{
public class MessageToken
{
/*-------------------- Controls --------------------*/
public static readonly string GrowlDemoCtl = nameof(GrowlDemoCtl);
public static readonly string LoadingDemoCtl = nameof(LoadingDemoCtl);
public static readonly string ImageBrowserDemoCtl = nameof(ImageBrowserDemoCtl);
public static readonly string ColorPickerDemoCtl = nameof(ColorPickerDemoCtl);
public static readonly string CarouselDemoCtl = nameof(CarouselDemoCtl);
public static readonly string CompareSliderDemoCtl = nameof(CompareSliderDemoCtl);
public static readonly string TimeBarDemoCtl = nameof(TimeBarDemoCtl);
public static readonly string PaginationDemoCtl = nameof(PaginationDemoCtl);
public static readonly string AnimationPathDemoCtl = nameof(AnimationPathDemoCtl);
public static readonly string StepBarDemoCtl = nameof(StepBarDemoCtl);
public static readonly string ClockDemoCtl = nameof(ClockDemoCtl);
public static readonly string TimePickerDemoCtl = nameof(TimePickerDemoCtl);
public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
public static readonly string NumericUpDownDemoCtl = nameof(NumericUpDownDemoCtl);
public static readonly string WindowDemoCtl = nameof(WindowDemoCtl);
public static readonly string ScrollViewerDemoCtl = nameof(ScrollViewerDemoCtl);
public static readonly string PreviewSliderDemoCtl = nameof(PreviewSliderDemoCtl);
public static readonly string ProgressBarDemoCtl = nameof(ProgressBarDemoCtl);
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
public static readonly string DateTimePickerDemoCtl = nameof(DateTimePickerDemoCtl);
public static readonly string CalendarWithClockDemoCtl = nameof(CalendarWithClockDemoCtl);
public static readonly string SearchBarDemoCtl = nameof(SearchBarDemoCtl);
public static readonly string TagDemoCtl = nameof(TagDemoCtl);
public static readonly string GifImageDemoCtl = nameof(GifImageDemoCtl);
public static readonly string OutlineTextDemoCtl = nameof(OutlineTextDemoCtl);
public static readonly string FlipClockDemoCtl = nameof(FlipClockDemoCtl);
public static readonly string QQGroupView = nameof(QQGroupView);
public static readonly string BlurWindow = nameof(BlurWindow);
public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow);
public static readonly string RateDemoCtl = nameof(RateDemoCtl);
public static readonly string ShieldDemoCtl = nameof(ShieldDemoCtl);
public static readonly string WaterfallPanelDemoCtl = nameof(WaterfallPanelDemoCtl);
public static readonly string CoverViewDemoCtl = nameof(CoverViewDemoCtl);
public static readonly string CoverFlowDemoCtl = nameof(CoverFlowDemoCtl);
public static readonly string ProgressButtonDemoCtl = nameof(ProgressButtonDemoCtl);
public static readonly string TransferDemoCtl = nameof(TransferDemoCtl);
public static readonly string ChatBubbleDemoCtl = nameof(ChatBubbleDemoCtl);
public static readonly string GotoTopDemoCtl = nameof(GotoTopDemoCtl);
public static readonly string NotifyIconDemoCtl = nameof(NotifyIconDemoCtl);
public static readonly string BadgeDemoCtl = nameof(BadgeDemoCtl);
public static readonly string GravatarDemoCtl = nameof(GravatarDemoCtl);
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl);
public static readonly string SideMenuDemoCtl = nameof(SideMenuDemoCtl);
public static readonly string GridDemoCtl = nameof(GridDemoCtl);
public static readonly string PoptipDemoCtl = nameof(PoptipDemoCtl);
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl);
public static readonly string ButtonGroupDemoCtl = nameof(ButtonGroupDemoCtl);
public static readonly string CardDemoCtl = nameof(CardDemoCtl);
public static readonly string MagnifierDemoCtl = nameof(MagnifierDemoCtl);
public static readonly string ImageBlockDemoCtl = nameof(ImageBlockDemoCtl);
public static readonly string RunningBlockDemoCtl = nameof(RunningBlockDemoCtl);
public static readonly string HoneycombPanelDemoCtl = nameof(HoneycombPanelDemoCtl);
public static readonly string SpriteDemoCtl = nameof(SpriteDemoCtl);
public static readonly string NotificationDemoCtl = nameof(NotificationDemoCtl);
public static readonly string FloatingBlockDemoCtl = nameof(FloatingBlockDemoCtl);
public static readonly string SplitButtonDemoCtl = nameof(SplitButtonDemoCtl);
public static readonly string DividerDemoCtl = nameof(DividerDemoCtl);
public static readonly string TransitioningContentControlDemoCtl = nameof(TransitioningContentControlDemoCtl);
/*-------------------- Tools --------------------*/
public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl);
public static readonly string GeometryAnimationDemoCtl = nameof(GeometryAnimationDemoCtl);
/*-------------------- Styles --------------------*/
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
public static readonly string ExpanderDemoCtl = nameof(ExpanderDemoCtl);
public static readonly string NativeProgressBarDemoCtl = nameof(NativeProgressBarDemoCtl);
public static readonly string TabControlDemoCtl = nameof(TabControlDemoCtl);
public static readonly string CalendarDemoCtl = nameof(CalendarDemoCtl);
public static readonly string NativeDatePickerDemoCtl = nameof(NativeDatePickerDemoCtl);
public static readonly string NativeTextBoxDemoCtl = nameof(NativeTextBoxDemoCtl);
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
public static readonly string NativeComboBoxDemoCtl = nameof(NativeComboBoxDemoCtl);
public static readonly string NativePasswordBoxDemoCtl = nameof(NativePasswordBoxDemoCtl);
public static readonly string NativeTabControlDemoCtl = nameof(NativeTabControlDemoCtl);
public static readonly string DataGridDemoCtl = nameof(DataGridDemoCtl);
public static readonly string CheckBoxDemoCtl = nameof(CheckBoxDemoCtl);
public static readonly string ListBoxDemoCtl = nameof(ListBoxDemoCtl);
public static readonly string MenuDemoCtl = nameof(MenuDemoCtl);
public static readonly string TreeViewDemoCtl = nameof(TreeViewDemoCtl);
public static readonly string BorderDemoCtl = nameof(BorderDemoCtl);
public static readonly string RadioButtonDemoCtl = nameof(RadioButtonDemoCtl);
public static readonly string NativeScrollViewerDemoCtl = nameof(NativeScrollViewerDemoCtl);
public static readonly string BrushDemoCtl = nameof(BrushDemoCtl);
public static readonly string SliderDemoCtl = nameof(SliderDemoCtl);
public static readonly string GroupBoxDemoCtl = nameof(GroupBoxDemoCtl);
public static readonly string ListViewDemoCtl = nameof(ListViewDemoCtl);
public static readonly string RichTextBoxDemoCtl = nameof(RichTextBoxDemoCtl);
public static readonly string ToolBarDemoCtl = nameof(ToolBarDemoCtl);
public static readonly string LabelDemoCtl = nameof(LabelDemoCtl);
/*-------------------- Windows --------------------*/
/*-------------------- Windows --------------------*/
public static readonly string CommonWindow = nameof(CommonWindow);
@ -224,5 +36,11 @@
public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo);
public static readonly string QQGroupView = nameof(QQGroupView);
public static readonly string BlurWindow = nameof(BlurWindow);
public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow);
}
}

View File

@ -2,106 +2,6 @@
<#@ import namespace="System.Collections.Generic"#>
<#@ output extension=".cs" #>
<#
var controlList = new List<string>
{
"GrowlDemoCtl",
"LoadingDemoCtl",
"ImageBrowserDemoCtl",
"ColorPickerDemoCtl",
"CarouselDemoCtl",
"CompareSliderDemoCtl",
"TimeBarDemoCtl",
"PaginationDemoCtl",
"AnimationPathDemoCtl",
"StepBarDemoCtl",
"ClockDemoCtl",
"TimePickerDemoCtl",
"CirclePanelDemoCtl",
"NumericUpDownDemoCtl",
"WindowDemoCtl",
"ScrollViewerDemoCtl",
"PreviewSliderDemoCtl",
"ProgressBarDemoCtl",
"TextBoxDemoCtl",
"ComboBoxDemoCtl",
"PasswordBoxDemoCtl",
"DatePickerDemoCtl",
"DateTimePickerDemoCtl",
"CalendarWithClockDemoCtl",
"SearchBarDemoCtl",
"TagDemoCtl",
"GifImageDemoCtl",
"OutlineTextDemoCtl",
"FlipClockDemoCtl",
"QQGroupView",
"BlurWindow",
"NoNonClientAreaDragableWindow",
"RateDemoCtl",
"ShieldDemoCtl",
"WaterfallPanelDemoCtl",
"CoverViewDemoCtl",
"CoverFlowDemoCtl",
"ProgressButtonDemoCtl",
"TransferDemoCtl",
"ChatBubbleDemoCtl",
"GotoTopDemoCtl",
"NotifyIconDemoCtl",
"BadgeDemoCtl",
"GravatarDemoCtl",
"DialogDemoCtl",
"SideMenuDemoCtl",
"GridDemoCtl",
"PoptipDemoCtl",
"RangeSliderDemoCtl",
"ButtonGroupDemoCtl",
"CardDemoCtl",
"MagnifierDemoCtl",
"ImageBlockDemoCtl",
"RunningBlockDemoCtl",
"HoneycombPanelDemoCtl",
"SpriteDemoCtl",
"NotificationDemoCtl",
"FloatingBlockDemoCtl",
"SplitButtonDemoCtl",
"DividerDemoCtl",
"TransitioningContentControlDemoCtl"
};
var styleList = new List<string>
{
"ButtonDemoCtl",
"RepeatButtonDemoCtl",
"ToggleButtonDemoCtl",
"ExpanderDemoCtl",
"NativeProgressBarDemoCtl",
"TabControlDemoCtl",
"CalendarDemoCtl",
"NativeDatePickerDemoCtl",
"NativeTextBoxDemoCtl",
"TextBlockDemoCtl",
"NativeComboBoxDemoCtl",
"NativePasswordBoxDemoCtl",
"NativeTabControlDemoCtl",
"DataGridDemoCtl",
"CheckBoxDemoCtl",
"ListBoxDemoCtl",
"MenuDemoCtl",
"TreeViewDemoCtl",
"BorderDemoCtl",
"RadioButtonDemoCtl",
"NativeScrollViewerDemoCtl",
"BrushDemoCtl",
"SliderDemoCtl",
"GroupBoxDemoCtl",
"ListViewDemoCtl",
"RichTextBoxDemoCtl",
"ToolBarDemoCtl",
"LabelDemoCtl"
};
var toolList = new List<string>
{
"HatchBrushGeneratorDemoCtl",
"GeometryAnimationDemoCtl"
};
var windowList = new List<string>
{
"CommonWindow",
@ -121,32 +21,17 @@ var messageList = new List<string>
"ProjectsView",
"BlogsView",
"NotifyIconDemo",
"NotifyIconContextDemo"
"NotifyIconContextDemo",
"QQGroupView",
"BlurWindow",
"NoNonClientAreaDragableWindow"
};
#>
namespace HandyControlDemo.Data
{
public class MessageToken
{
/*-------------------- Controls --------------------*/
<#foreach(var item in controlList){#>
public static readonly string <#=item#> = nameof(<#=item#>);
<#}#>
/*-------------------- Tools --------------------*/
<#foreach(var item in toolList){#>
public static readonly string <#=item#> = nameof(<#=item#>);
<#}#>
/*-------------------- Styles --------------------*/
<#foreach(var item in styleList){#>
public static readonly string <#=item#> = nameof(<#=item#>);
<#}#>
/*-------------------- Windows --------------------*/
/*-------------------- Windows --------------------*/
<#foreach(var item in windowList){#>
public static readonly string <#=item#> = nameof(<#=item#>);

View File

@ -0,0 +1,13 @@
using System.Collections.Generic;
namespace HandyControlDemo.Data
{
public class DemoInfoModel
{
public string Title { get; set; }
public int SelectedIndex { get; set; }
public IList<DemoItemModel> DemoItemList { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace HandyControlDemo.Data
{
public class DemoItemModel
{
public string Name { get; set; }
public string TargetCtlName { get; set; }
public string ImageName { get; set; }
public bool IsNew { get; set; }
public bool IsSelected { get; set; }
}
}

View File

@ -21,6 +21,8 @@
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\AvatarModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\CoverViewDemoModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\DemoDataModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\DemoInfoModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\DemoItemModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\StepBarDemoModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Model\TabControlDemoModel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MainWindow.xaml.cs">
@ -60,6 +62,9 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\DividerDemoCtl.xaml.cs">
<DependentUpon>DividerDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\DrawerDemoCtl.xaml.cs">
<DependentUpon>DrawerDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml.cs">
<DependentUpon>FloatingBlockDemoCtl.xaml</DependentUpon>
</Compile>
@ -475,6 +480,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\DrawerDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\FloatingBlockDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@ -2,8 +2,10 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Windows;
using HandyControl.Data;
using HandyControlDemo.Data;
using HandyControlDemo.Tools.Converter;
@ -341,5 +343,56 @@ namespace HandyControlDemo.Service
}
};
}
internal List<DemoInfoModel> GetDemoInfo()
{
var infoList = new List<DemoInfoModel>();
var stream = Application.GetResourceStream(new Uri("Data/DemoInfo.json", UriKind.Relative))?.Stream;
if (stream == null) return infoList;
string jsonStr;
using (var reader = new StreamReader(stream))
{
jsonStr = reader.ReadToEnd();
}
var jsonObj = JsonConvert.DeserializeObject<dynamic>(jsonStr);
foreach (var item in jsonObj)
{
var title = Properties.Langs.Lang.ResourceManager.GetString((string)item.title);
var list = Convert2DemoItemList(item.demoItemList);
infoList.Add(new DemoInfoModel
{
Title = title,
DemoItemList = list
});
}
return infoList;
}
private List<DemoItemModel> Convert2DemoItemList(dynamic list)
{
var resultList = new List<DemoItemModel>();
foreach (var item in list)
{
var name = Properties.Langs.Lang.ResourceManager.GetString((string) item[0]);
string targetCtlName = item[1];
string imageName = item[2];
var isNew = !string.IsNullOrEmpty((string) item[3]);
resultList.Add(new DemoItemModel
{
Name = name,
TargetCtlName = targetCtlName,
ImageName = $"../../Resources/Img/LeftMainContent/{imageName}.png",
IsNew = isNew
});
}
return resultList;
}
}
}

View File

@ -0,0 +1,8 @@
<UserControl x:Class="HandyControlDemo.UserControl.DrawerDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{DynamicResource RegionBrush}">
<Grid>
</Grid>
</UserControl>

View File

@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class DrawerDemoCtl
{
public DrawerDemoCtl()
{
InitializeComponent();
}
}
}

View File

@ -3,529 +3,66 @@
xmlns:command="http://www.galasoft.ch/mvvmlight"
x:Class="HandyControlDemo.UserControl.LeftMainContent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:data="clr-namespace:HandyControlDemo.Data"
Background="{Binding Background,RelativeSource={RelativeSource AncestorType=Window}}"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Border.Resources>
<Style x:Key="DemoInfoSortButtonStyle" BasedOn="{StaticResource ToggleButtonCustom}" TargetType="ToggleButton" x:Shared="False">
<Setter Property="Content">
<Setter.Value>
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
</Border>
</Setter.Value>
</Setter>
<Setter Property="hc:StatusSwitchElement.CheckedElement">
<Setter.Value>
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</Setter.Value>
</Setter>
</Style>
</Border.Resources>
<DockPanel>
<Button Command="{Binding OpenOverviewCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="4,4,4,0" Content="{x:Static langs:Lang.Overview}"/>
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemsSource="{Binding DemoInfoList}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}"/>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxDemo}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource DemoInfoSortButtonStyle}"/>
<ListBox Name="ListBoxDemo" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Width="16" Height="16" Source="{Binding ImageName}"/>
<TextBlock Margin="6,0,0,0" Text="{Binding Name}"/>
<Path Visibility="{Binding IsNew,Converter={StaticResource Boolean2VisibilityConverter}}" VerticalAlignment="Center" Data="{StaticResource NewGeometry}" Stretch="Uniform" Margin="10,0,0,0" Width="30" Height="14" Fill="{DynamicResource DangerBrush}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</DataTemplate>
</TabControl.ContentTemplate>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxStyle}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxStyle}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
</Border>
<hc:StatusSwitchElement.CheckedElement>
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</hc:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="ListBoxStyle" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Content="{x:Static langs:Lang.Button}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ButtonClick_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RepeatButtonDemoCtl}" Content="{x:Static langs:Lang.RepeatButton}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/RepeatButton_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Content="{x:Static langs:Lang.ToggleButton}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Toggle_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RadioButtonDemoCtl}" Content="{x:Static langs:Lang.RadioButton}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/RadioButton_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CheckBoxDemoCtl}" Content="{x:Static langs:Lang.CheckBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/CheckBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.SliderDemoCtl}" Content="{x:Static langs:Lang.Slider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Slider_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TextBlockDemoCtl}" Content="{x:Static langs:Lang.TextBlock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativePasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Content="{x:Static langs:Lang.Expander}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Expander_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarDemoCtl}" Content="{x:Static langs:Lang.Calendar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeDatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NativeTabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.DataGridDemoCtl}" Content="{x:Static langs:Lang.DataGrid}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DataGrid_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TreeViewDemoCtl}" Content="{x:Static langs:Lang.TreeView}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TreeView_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ListBoxDemoCtl}" Content="{x:Static langs:Lang.ListBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ListBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ListViewDemoCtl}" Content="{x:Static langs:Lang.ListView}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ListView_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GroupBoxDemoCtl}" Content="{x:Static langs:Lang.GroupBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GroupBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.MenuDemoCtl}" Content="{x:Static langs:Lang.Menu}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ContextMenu_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RichTextBoxDemoCtl}" Content="{x:Static langs:Lang.RichTextBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/RichTextBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ToolBarDemoCtl}" Content="{x:Static langs:Lang.ToolBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ToolBar_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.BorderDemoCtl}" Name="ListBoxItemBorder">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/BorderElement_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.LabelDemoCtl}" Content="{x:Static langs:Lang.Label}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Label_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
</ListBox>
</Grid>
</TabItem>
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxControl}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxControl}" Name="ButtonControlAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
</Border>
<hc:StatusSwitchElement.CheckedElement>
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</hc:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="ListBoxControl" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.FloatingBlockDemoCtl}" Content="{x:Static langs:Lang.FloatingBlock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/thumbs_up.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBlockDemoCtl}" Content="{x:Static langs:Lang.ImageBlock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ImageStack_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GravatarDemoCtl}" Content="{x:Static langs:Lang.Gravatar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/User_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.BadgeDemoCtl}" Content="{x:Static langs:Lang.Badge}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DotLarge_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GotoTopDemoCtl}" Content="{x:Static langs:Lang.GotoTop}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GoToTop_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.SplitButtonDemoCtl}" Content="{x:Static langs:Lang.SplitButton}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/SplitButton_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ButtonGroupDemoCtl}" Content="{x:Static langs:Lang.ButtonGroup}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ButtonGroup_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressButtonDemoCtl}" Content="{x:Static langs:Lang.ProgressButton}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ProgressButton_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ChatBubbleDemoCtl}" Content="{x:Static langs:Lang.ChatBubble}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Bubble_16xLG.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.PoptipDemoCtl}" Content="{x:Static langs:Lang.Poptip}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PopupCursor_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NotifyIconDemoCtl}" Content="{x:Static langs:Lang.NotifyIcon}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/NotificationHub_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ComboBoxDemoCtl}" Content="{x:Static langs:Lang.ComboBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ComboBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.PasswordBoxDemoCtl}" Content="{x:Static langs:Lang.PasswordBox}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PasswordBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.DatePickerDemoCtl}" Content="{x:Static langs:Lang.DatePicker}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ClockDemoCtl}" Content="{x:Static langs:Lang.Clock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Time_color_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TimePickerDemoCtl}" Content="{x:Static langs:Lang.TimePicker}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TimePicker_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CalendarWithClockDemoCtl}" Content="{x:Static langs:Lang.CalendarWithClock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Calendar_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.DateTimePickerDemoCtl}" Content="{x:Static langs:Lang.DateTimePicker}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DatePicker_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TransferDemoCtl}" Content="{x:Static langs:Lang.Transfer}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Transfer_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.FlipClockDemoCtl}" Content="{x:Static langs:Lang.FlipClock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/FlipVertical_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RateDemoCtl}" Content="{x:Static langs:Lang.Rate}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Star.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ShieldDemoCtl}" Content="{x:Static langs:Lang.Shield}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Shield_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.SearchBarDemoCtl}" Content="{x:Static langs:Lang.SearchBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TagDemoCtl}" Content="{x:Static langs:Lang.Tag}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Tag_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GifImageDemoCtl}" Content="{x:Static langs:Lang.GifImage}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.OutlineTextDemoCtl}" Content="{x:Static langs:Lang.OutlineText}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TextBlock_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RunningBlockDemoCtl}" Content="{x:Static langs:Lang.RunningBlock}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Dynamic_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CardDemoCtl}" Content="{x:Static langs:Lang.Card}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/VSO_Card_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DividerDemoCtl}" Content="{x:Static langs:Lang.Divider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DottedSplitter_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GridDemoCtl}" Content="{x:Static langs:Lang.Grid}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/GridPane_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.WaterfallPanelDemoCtl}" Content="{x:Static langs:Lang.WaterfallPanel}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.HoneycombPanelDemoCtl}" Content="{x:Static langs:Lang.HoneycombPanel}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/PolygonHexagon_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TransitioningContentControlDemoCtl}" Content="{x:Static langs:Lang.TransitioningContentControl}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TransitioningContentControl_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CoverFlowDemoCtl}" Content="{x:Static langs:Lang.CoverFlow}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/LinearCarousel_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Content="{x:Static langs:Lang.ProgressBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ProgressBar_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Content="{x:Static langs:Lang.StepBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Flow_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Content="{x:Static langs:Lang.Growl}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Message_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Content="{x:Static langs:Lang.Loading}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Loading_Blue_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Content="{x:Static langs:Lang.ImageBrowser}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ImageBrowser_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Content="{x:Static langs:Lang.ColorPicker}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ColorPalette_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Content="{x:Static langs:Lang.Carousel}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Carousel_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Content="{x:Static langs:Lang.CompareSlider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/SplitterControl_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.PreviewSliderDemoCtl}" Content="{x:Static langs:Lang.PreviewSlider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/HoverMenu_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.RangeSliderDemoCtl}" Content="{x:Static langs:Lang.RangeSlider}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/brackets_Square_16xLG.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Content="{x:Static langs:Lang.TimeBar}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Timeline_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Content="{x:Static langs:Lang.Pagination}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Paginator_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Content="{x:Static langs:Lang.AnimationPath}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Path_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Content="{x:Static langs:Lang.TabControl}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/TabPage_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.SideMenuDemoCtl}" Content="{x:Static langs:Lang.SideMenu}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/MainMenuControl_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.ScrollViewerDemoCtl}" Content="{x:Static langs:Lang.ScrollViewer}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.SpriteDemoCtl}" Content="{x:Static langs:Lang.Sprite}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/HandyControl.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.NotificationDemoCtl}" Content="{x:Static langs:Lang.Notification}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Procedure_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.WindowDemoCtl}" Content="{x:Static langs:Lang.Window}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/WindowsForm_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
</ListBox>
</Grid>
</TabItem>
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Tools}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxStyle}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxTool}" Name="ButtonToolAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource ToggleButtonCustom}">
<Border CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Background="{DynamicResource RegionBrush}" Height="30" Width="30" >
<Image Stretch="None" Source="/HandyControlDemo;component/Resources/Img/LeftMainContent/SortAscending_grey_16x.png"/>
</Border>
<hc:StatusSwitchElement.CheckedElement>
<Border CornerRadius="4" Height="30" Width="30" BorderThickness="1" BorderBrush="{DynamicResource PrimaryBrush}"/>
</hc:StatusSwitchElement.CheckedElement>
</ToggleButton>
<ListBox Name="ListBoxTool" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.HatchBrushGeneratorDemoCtl}" Content="{x:Static langs:Lang.HatchBrushGenerator}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/DataGenerator_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
<ListBoxItem Tag="{x:Static data:MessageToken.GeometryAnimationDemoCtl}" Content="{x:Static langs:Lang.Morphing_Animation}">
<hc:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Animation_16x.png"/>
</hc:EdgeElement.LeftContent>
</ListBoxItem>
</ListBox>
</Grid>
</TabItem>
</TabControl>
</DockPanel>
</Border>

View File

@ -1,11 +1,12 @@
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using GalaSoft.MvvmLight.Messaging;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControl.Tools.Extension;
using HandyControlDemo.Data;
namespace HandyControlDemo.UserControl
@ -19,27 +20,36 @@ namespace HandyControlDemo.UserControl
{
InitializeComponent();
/*You have to ask me why I made Border special.
What drives me crazy is that if you don't do this,
the content of ListBoxItemBorder will always be 1 !
How amazing!
I wish someone could tell me why. */
ListBoxItemBorder.Content = Properties.Langs.Lang.Border;
//Messenger.Default.Register<object>(this, MessageToken.ClearLeftSelected, obj =>
//{
// ListBoxStyle.SelectedItem = null;
// ListBoxControl.SelectedItem = null;
// ListBoxTool.SelectedItem = null;
//});
}
private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 0) return;
if (e.AddedItems[0] is TabItem tabItem &&
VisualHelper.GetChild<ListBox>(tabItem.Content as DependencyObject) is ListBox listBox)
if (e.AddedItems[0] is DemoInfoModel demoInfo)
{
if (listBox.SelectedItem != null)
{
var item = listBox.SelectedItem;
listBox.SelectedIndex = -1;
listBox.SelectedItem = item;
}
var selectedIndex = demoInfo.SelectedIndex;
demoInfo.SelectedIndex = -1;
demoInfo.SelectedIndex = selectedIndex;
}
//if (e.OriginalSource is ItemsControl itemsControl)
//{
// if (!(itemsControl.ItemContainerGenerator.ContainerFromItem(e.AddedItems[0]) is ContentControl container)) return;
// var selector = VisualHelper.GetChild<Selector>(container as DependencyObject);
// if (selector.SelectedItem != null)
// {
// var item = selector.SelectedItem;
// selector.SelectedIndex = -1;
// selector.SelectedItem = item;
// }
//}
}
private void ButtonAscending_OnClick(object sender, RoutedEventArgs e)
@ -48,7 +58,7 @@ namespace HandyControlDemo.UserControl
{
if (button.IsChecked == true)
{
itemsControl.Items.SortDescriptions.Add(new SortDescription("Content", ListSortDirection.Ascending));
itemsControl.Items.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
}
else
{
@ -61,10 +71,11 @@ namespace HandyControlDemo.UserControl
{
if (e.Info == null) return;
if (!(sender is FrameworkElement searchBar && searchBar.Tag is ListBox listBox)) return;
foreach (var listBoxItem in listBox.Items.OfType<ListBoxItem>())
foreach (DemoItemModel item in listBox.Items)
{
listBoxItem.Show(listBoxItem.Content.ToString().ToLower().Contains(e.Info.ToLower()) ||
listBoxItem.Tag.ToString().Replace("DemoCtl", "").ToLower().Contains(e.Info.ToLower()));
var listBoxItem = listBox.ItemContainerGenerator.ContainerFromItem(item) as ListBoxItem;
listBoxItem?.Show(item.Name.ToLower().Contains(e.Info.ToLower()) ||
item.TargetCtlName.Replace("DemoCtl", "").ToLower().Contains(e.Info.ToLower()));
}
}
}

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Windows.Controls;
#if netle40
using GalaSoft.MvvmLight.Command;
@ -29,9 +30,14 @@ namespace HandyControlDemo.ViewModel
private object _subContent;
/// <summary>
/// 当前选中的列表项
/// demo信息
/// </summary>
private ListBoxItem _listBoxItemCurrent;
private List<DemoInfoModel> _demoInfoList;
/// <summary>
/// 当前选中的demo项
/// </summary>
private DemoItemModel _demoItemCurrent;
#endregion
@ -45,13 +51,14 @@ namespace HandyControlDemo.ViewModel
}
SubContent = obj;
});
Messenger.Default.Register<object>(this, MessageToken.ClearLeftSelected, obj =>
{
if (_listBoxItemCurrent == null) return;
_listBoxItemCurrent.IsSelected = false;
_listBoxItemCurrent = null;
_demoItemCurrent = null;
});
DataList = dataService.GetDemoDataList();
DemoInfoList = dataService.GetDemoInfo();
}
#region
@ -82,6 +89,19 @@ namespace HandyControlDemo.ViewModel
#endif
}
/// <summary>
/// demo信息
/// </summary>
public List<DemoInfoModel> DemoInfoList
{
get => _demoInfoList;
#if netle40
set => Set(nameof(DemoInfoList), ref _demoInfoList, value);
#else
set => Set(ref _demoInfoList, value);
#endif
}
#endregion
#region
@ -115,24 +135,16 @@ namespace HandyControlDemo.ViewModel
private void SwitchDemo(SelectionChangedEventArgs e)
{
if (e.AddedItems.Count == 0) return;
if (e.AddedItems[0] is ListBoxItem item)
if (e.AddedItems[0] is DemoItemModel item)
{
if (item.Tag is string tag)
{
if (Equals(_listBoxItemCurrent, item)) return;
_listBoxItemCurrent = item;
ContentTitle = item.Content;
var obj = AssemblyHelper.ResolveByKey(tag);
var ctl = obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{tag}");
Messenger.Default.Send(ctl is IFull, MessageToken.FullSwitch);
Messenger.Default.Send(ctl, MessageToken.LoadShowContent);
}
else
{
_listBoxItemCurrent = null;
ContentTitle = null;
SubContent = null;
}
if (Equals(_demoItemCurrent, item)) return;
_demoItemCurrent = item;
ContentTitle = item.Name;
var obj = AssemblyHelper.ResolveByKey(item.TargetCtlName);
var ctl = obj ?? AssemblyHelper.CreateInternalInstance($"UserControl.{item.TargetCtlName}");
Messenger.Default.Send(ctl is IFull, MessageToken.FullSwitch);
Messenger.Default.Send(ctl, MessageToken.LoadShowContent);
}
}

View File

@ -91,7 +91,7 @@ namespace HandyControl.Expression.Drawing
{
for (var i = list.Count; i < count; i++)
{
list.Add((factory == null) ? default(T) : factory());
list.Add((factory == null) ? default : factory());
}
}
return true;

View File

@ -13,7 +13,7 @@ namespace HandyControl.Tools.Extension
}
catch
{
return default(T);
return default;
}
}

View File

@ -47,7 +47,7 @@ namespace HandyControl.Tools
return resource;
}
return default(T);
return default;
}
/// <summary>

View File

@ -21,7 +21,7 @@ namespace HandyControl.Tools
{
var typeStr = typeof(T).FullName;
if (string.IsNullOrEmpty(typeStr)) return default(T);
if (string.IsNullOrEmpty(typeStr)) return default;
var temp = new T();
if (!OpenDic.Keys.Contains(typeStr))
@ -36,7 +36,7 @@ namespace HandyControl.Tools
OpenDic[typeStr] = temp;
return temp;
}
return default(T);
return default;
}
}
}