diff --git a/README.md b/README.md index 5f3ec227..f327efcd 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ + + ## Special thanks to diff --git a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json index 5ad15cc0..bd53b554 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json +++ b/src/Shared/HandyControlDemo_Shared/Data/DemoInfo.json @@ -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", "" ] - ] -} \ No newline at end of file +[ + { + "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", "" ] + ] + } +] \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs index 31a98a9a..a06921d7 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs @@ -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); + } } \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt index 10c881f8..66986682 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.tt @@ -2,106 +2,6 @@ <#@ import namespace="System.Collections.Generic"#> <#@ output extension=".cs" #> <# -var controlList = new List -{ - "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 -{ - "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 -{ - "HatchBrushGeneratorDemoCtl", - "GeometryAnimationDemoCtl" -}; var windowList = new List { "CommonWindow", @@ -121,32 +21,17 @@ var messageList = new List "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#>); diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs new file mode 100644 index 00000000..9692dcab --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs @@ -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 DemoItemList { get; set; } + } +} diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs new file mode 100644 index 00000000..31344903 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs @@ -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; } + } +} diff --git a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems index ec4ff019..6d09742c 100644 --- a/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems +++ b/src/Shared/HandyControlDemo_Shared/HandyControlDemo_Shared.projitems @@ -21,6 +21,8 @@ + + @@ -60,6 +62,9 @@ DividerDemoCtl.xaml + + DrawerDemoCtl.xaml + FloatingBlockDemoCtl.xaml @@ -475,6 +480,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs index 8e753131..acb94de8 100644 --- a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs +++ b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs @@ -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 GetDemoInfo() + { + var infoList = new List(); + + 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(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 Convert2DemoItemList(dynamic list) + { + var resultList = new List(); + + 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; + } } } \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml new file mode 100644 index 00000000..cec99401 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs new file mode 100644 index 00000000..81259d96 --- /dev/null +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs @@ -0,0 +1,10 @@ +namespace HandyControlDemo.UserControl +{ + public partial class DrawerDemoCtl + { + public DrawerDemoCtl() + { + InitializeComponent(); + } + } +} diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml index 3fd46ca8..36596d31 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml @@ -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"> + + +