├── .gitattributes
├── .gitignore
├── README-en.md
├── README.md
├── Resources
├── AlertDemo.png
├── ButtonsDemo.gif
├── CheckBoxDemo.png
├── ComboBoxDemo.png
├── ContextMenuDemo.png
├── FieldDemo.png
├── HelloWeUiSharp.png
├── IconButtonDemo.gif
├── Localization.png
├── MessageBoxDemo.png
├── Overview.png
├── PathButtonDemo.gif
├── ToastDemo.png
├── ToggleButtonDemo.gif
├── WeChatLoginDemo.png
├── WeUiSharp.ico
├── WeUiSharpLogo.png
├── WeUiSharpLogo.psd
└── 公众号.jpg
└── Src
├── WeUiSharp.Demo
├── App.xaml
├── App.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ ├── Settings.settings
│ ├── Strings.Designer.cs
│ ├── Strings.en.Designer.cs
│ ├── Strings.en.resx
│ ├── Strings.resx
│ ├── Strings.zh-CN.Designer.cs
│ ├── Strings.zh-CN.resx
│ ├── Strings.zh-Hant.Designer.cs
│ └── Strings.zh-Hant.resx
├── Resources
│ ├── Chat.png
│ ├── Chat_MouseOver.png
│ ├── Chat_Pressed.png
│ ├── Overview.png
│ ├── WeUiSharp.ico
│ ├── WeUiSharp.png
│ └── 公众号.jpg
├── Utilities
│ └── RegionNames.cs
├── ViewModels
│ ├── DemoItemListViewModel.cs
│ ├── DemoItemViewModel.cs
│ ├── MainWindowViewModel.cs
│ ├── MyCustomDetailViewModel.cs
│ ├── MyCustomListViewModel.cs
│ ├── OverviewViewModel.cs
│ ├── SettingsWindowViewModel.cs
│ ├── WeChatLoginViewModel.cs
│ ├── WeChatLoginWindowViewModel.cs
│ └── YourCustomViewModel.cs
├── Views
│ ├── DemoItemListView.xaml
│ ├── DemoItemListView.xaml.cs
│ ├── DemoItemView.xaml
│ ├── DemoItemView.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── MyCustomDetailView.xaml
│ ├── MyCustomDetailView.xaml.cs
│ ├── MyCustomListView.xaml
│ ├── MyCustomListView.xaml.cs
│ ├── OverviewView.xaml
│ ├── OverviewView.xaml.cs
│ ├── SettingsWindow.xaml
│ ├── SettingsWindow.xaml.cs
│ ├── WeChatLoginView.xaml
│ ├── WeChatLoginView.xaml.cs
│ ├── WeChatLoginWindow.xaml
│ ├── WeChatLoginWindow.xaml.cs
│ ├── YourCustomView.xaml
│ └── YourCustomView.xaml.cs
├── WeUiSharp.Demo.csproj
└── WeUiSharp.ico
├── WeUiSharp.HelloWorld
├── App.config
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── WeUiSharp.HelloWorld.csproj
└── packages.config
├── WeUiSharp.HelloWorldWithPrism
├── App.xaml
├── App.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── ViewModels
│ └── MainWindowViewModel.cs
├── Views
│ ├── MainWindow.xaml
│ └── MainWindow.xaml.cs
└── WeUiSharp.HelloWorldWithPrism.csproj
├── WeUiSharp.sln
└── WeUiSharp
├── .editorconfig
├── Common
└── TypedEventHandler.cs
├── Controls
├── AddButton.xaml
├── AddButton.xaml.cs
├── Badge.cs
├── Button.cs
├── ClippingBorder.cs
├── ComboBox.cs
├── Field.cs
├── HamburgerMenuItemBase.cs
├── IconButton.cs
├── MenuItemSeparator.cs
├── MessageBox.xaml
├── MessageBox.xaml.cs
├── PathButton.cs
├── Primitives
│ ├── ControlHelper.cs
│ └── DelegateHelper.cs
├── SearchBar.xaml
├── SearchBar.xaml.cs
├── TabControl.cs
├── Toast.xaml
├── Toast.xaml.cs
└── WheelSpeedScrollViewer.cs
├── ControlsResources.xaml
├── Converters
├── EqualToVisibilityConverter.cs
├── InverseBooleanConverter.cs
└── InvertBoolToVisibilityConverter.cs
├── DesignTime
├── Design.cs
├── DesignTimeResources.xaml
├── IntellisenseResources.cs
├── IntellisenseResourcesBase.cs
├── ResourceKeys.xaml
└── SystemColors.xaml
├── Enums
├── ButtonGreenType.cs
├── MessageBoxButton.cs
└── MessageBoxResult.cs
├── Helpers
├── ColorsHelper.cs
├── DesignMode.cs
├── MergedDictionariesHelper.cs
├── PackUriHelper.cs
└── ThemeResourceHelper.cs
├── Interfaces
├── ICloseWindow.cs
└── ISortedView.cs
├── Localization
├── Translation.cs
└── TranslationSource.cs
├── Markup
├── DynamicColorExtension.cs
├── KeyTimeExtension.cs
├── LocExtension.cs
├── StaticColorExtension.cs
├── StaticResourceExtension.cs
└── ThemeResourceExtension.cs
├── Models
└── ContextMenuCommandItem.cs
├── Properties
├── AssemblyInfo-DESKTOP-SJ8KJP4.cs
├── AssemblyInfo.cs
├── Settings.Designer.cs
├── Settings.settings
├── Strings.Designer.cs
├── Strings.en.Designer.cs
├── Strings.en.resx
├── Strings.resx
├── Strings.zh-CN.Designer.cs
├── Strings.zh-CN.resx
├── Strings.zh-Hant.Designer.cs
└── Strings.zh-Hant.resx
├── ResourceDictionaryEx.cs
├── Resources
├── Geometries.xaml
├── Icons
│ ├── Plugin.png
│ ├── Plugin_Checked.png
│ └── Plugin_MouseOver.png
├── WeUiSharp.ico
└── WeUiSharp.png
├── Styles
├── BadgeStyle.xaml
├── ButtonBaseStyle.xaml
├── ButtonStyle.xaml
├── CheckBoxStyle.xaml
├── ClippingBorder.xaml
├── ComboBoxStyle.xaml
├── ContextMenuStyle.xaml
├── DocumentBaseStyle.xaml
├── FieldStyle.xaml
├── HamburgerMenuItemBaseStyle.xaml
├── IconButtonStyle.xaml
├── MenuItemSeparatorStyle.xaml
├── MenuItemStyle.xaml
├── MessageBox.xaml
├── MoreStyle.xaml
├── PathButtonStyle.xaml
├── ScrollBarStyle.xaml
├── TabControlStyle.xaml
├── ToggleButtonStyle.xaml
└── WindowStyle.xaml
├── ThemeDictionary.cs
├── ThemeManager.cs
├── ThemeResources.cs
├── ThemeResources
├── Dark.xaml
└── Light.xaml
├── Themes
└── Generic.xaml
├── Utilities
├── PopupEx.cs
├── ScrollBarEx.cs
├── StackPanelRegionAdapter.cs
└── WindowCloser.cs
├── WeUiSharp.csproj
├── WeUiSharp.ico
├── WeUiSharp.nuspec
├── WeUiSharp.png
├── Windows
├── AlertWindow.xaml
├── AlertWindow.xaml.cs
├── DocumentBase.cs
├── MessageBox.cs
├── MessageBoxWrapper.xaml
├── MessageBoxWrapper.xaml.cs
└── Window.cs
├── app.config
└── packages.config
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/Resources/AlertDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/AlertDemo.png
--------------------------------------------------------------------------------
/Resources/ButtonsDemo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/ButtonsDemo.gif
--------------------------------------------------------------------------------
/Resources/CheckBoxDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/CheckBoxDemo.png
--------------------------------------------------------------------------------
/Resources/ComboBoxDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/ComboBoxDemo.png
--------------------------------------------------------------------------------
/Resources/ContextMenuDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/ContextMenuDemo.png
--------------------------------------------------------------------------------
/Resources/FieldDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/FieldDemo.png
--------------------------------------------------------------------------------
/Resources/HelloWeUiSharp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/HelloWeUiSharp.png
--------------------------------------------------------------------------------
/Resources/IconButtonDemo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/IconButtonDemo.gif
--------------------------------------------------------------------------------
/Resources/Localization.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/Localization.png
--------------------------------------------------------------------------------
/Resources/MessageBoxDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/MessageBoxDemo.png
--------------------------------------------------------------------------------
/Resources/Overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/Overview.png
--------------------------------------------------------------------------------
/Resources/PathButtonDemo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/PathButtonDemo.gif
--------------------------------------------------------------------------------
/Resources/ToastDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/ToastDemo.png
--------------------------------------------------------------------------------
/Resources/ToggleButtonDemo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/ToggleButtonDemo.gif
--------------------------------------------------------------------------------
/Resources/WeChatLoginDemo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/WeChatLoginDemo.png
--------------------------------------------------------------------------------
/Resources/WeUiSharp.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/WeUiSharp.ico
--------------------------------------------------------------------------------
/Resources/WeUiSharpLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/WeUiSharpLogo.png
--------------------------------------------------------------------------------
/Resources/WeUiSharpLogo.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/WeUiSharpLogo.psd
--------------------------------------------------------------------------------
/Resources/公众号.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Resources/公众号.jpg
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using WeUiSharp.Demo.Views;
2 | using Prism.Ioc;
3 | using Prism.Modularity;
4 | using System.Windows;
5 | using Prism.Regions;
6 | using WeUiSharp.Demo.Utilities;
7 | using WeUiSharp.Demo.ViewModels;
8 | using WeUiSharp.Localization;
9 |
10 | namespace WeUiSharp.Demo
11 | {
12 | ///
13 | /// Interaction logic for App.xaml
14 | ///
15 | public partial class App
16 | {
17 | protected override Window CreateShell()
18 | {
19 |
20 | var ttt = SystemColors.GrayTextBrush.Color; // #FF6D6D6D
21 | return Container.Resolve();
22 | }
23 |
24 | protected override void RegisterTypes(IContainerRegistry containerRegistry)
25 | {
26 |
27 | }
28 | protected override void Initialize()
29 | {
30 | base.Initialize();
31 |
32 | // --------------------------- 确定默认语言 ---------------------------------------
33 | string cultureName = System.Globalization.CultureInfo.CurrentCulture.Name;
34 |
35 | // zh-CN 0x0804 中文(中国) zh-Hans 0x0004 中文(简体) zh-SG 0x1004 中文(新加坡)
36 | if (cultureName.Equals("zh-CN") || cultureName.Equals("zh-Hans") || cultureName.Equals("zh-SG"))
37 | {
38 | TranslationSource.Instance.Language = "zh-CN";
39 | }
40 | // zh-Hant 中文(繁体) zh-TW 中文(台湾)zh-HK 中文(香港特别行政区,中国)zh-MO 中文(澳门特别行政区)
41 | else if (cultureName.Equals("zh-Hant") || cultureName.Equals("zh-TW") || cultureName.Equals("zh-MO"))
42 | {
43 | TranslationSource.Instance.Language = "zh-Hant";
44 | }
45 | else
46 | {
47 | // 非中文系统全部按英文系统处理
48 | TranslationSource.Instance.Language = "en";
49 | }
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("WeUiSharp.Demo")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("WeUiSharp.Demo")]
15 | [assembly: AssemblyCopyright("Copyright © 2017")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WeUiSharp.Demo.Properties
12 | {
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeUiSharp.Demo.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WeUiSharp.Demo.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Strings.en.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Properties/Strings.en.Designer.cs
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Strings.zh-CN.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Properties/Strings.zh-CN.Designer.cs
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Properties/Strings.zh-Hant.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Properties/Strings.zh-Hant.Designer.cs
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/Chat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/Chat.png
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/Chat_MouseOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/Chat_MouseOver.png
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/Chat_Pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/Chat_Pressed.png
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/Overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/Overview.png
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/WeUiSharp.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/WeUiSharp.ico
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/WeUiSharp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/WeUiSharp.png
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Resources/公众号.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IUpdatable/WeUiSharp/974b51e63e33131b45fa6f5f47de7c7d15f495da/Src/WeUiSharp.Demo/Resources/公众号.jpg
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/Utilities/RegionNames.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WeUiSharp.Demo.Utilities
8 | {
9 | public class RegionNames
10 | {
11 | public static string ListRegion { get => "ListRegion"; }
12 |
13 | public static string DetailRegion { get => "DetailRegion"; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/ViewModels/DemoItemListViewModel.cs:
--------------------------------------------------------------------------------
1 | using Prism;
2 | using Prism.Commands;
3 | using Prism.Ioc;
4 | using Prism.Mvvm;
5 | using Prism.Regions;
6 | using System;
7 | using System.Collections.Generic;
8 | using System.Collections.ObjectModel;
9 | using System.Linq;
10 | using WeUiSharp.Demo.Utilities;
11 | using WeUiSharp.Demo.Views;
12 |
13 | namespace WeUiSharp.Demo.ViewModels
14 | {
15 | public class DemoItemListViewModel : BindableBase
16 | {
17 | #region [Fields]
18 | private ObservableCollection _DemoItems;
19 | private int _SelectedIndex;
20 | private IRegionManager _RegionManager;
21 | private IContainerProvider _ContainerProvider;
22 | #endregion
23 |
24 | #region [Properties]
25 | public ObservableCollection DemoItems
26 | {
27 | get
28 | {
29 | return _DemoItems;
30 | }
31 | set
32 | {
33 | SetProperty(ref _DemoItems, value);
34 | }
35 | }
36 | public int SelectedIndex
37 | {
38 | get
39 | {
40 | return _SelectedIndex;
41 | }
42 | set
43 | {
44 | SetProperty(ref _SelectedIndex, value);
45 | UpdateDetailView();
46 | }
47 | }
48 | #endregion
49 |
50 | public DemoItemListViewModel(IRegionManager regionManager, IContainerProvider containerProvider)
51 | {
52 | _RegionManager = regionManager;
53 | _ContainerProvider = containerProvider;
54 |
55 | _DemoItems = new ObservableCollection();
56 | _DemoItems.Add(new DemoItemViewModel() { Title = "Overview", Icon="../Resources/Overview.png" });
57 | _DemoItems.Add(new DemoItemViewModel() { Title = "WeChatLogin", Icon = "../Resources/Overview.png" });
58 |
59 | _SelectedIndex = 0;
60 | IRegion detailRegion = _RegionManager.Regions[RegionNames.DetailRegion];
61 | OverviewView overviewView = _ContainerProvider.Resolve();
62 | detailRegion.Add(overviewView, nameof(OverviewView));
63 | detailRegion.Activate(overviewView);
64 | }
65 |
66 | public void UpdateDetailView()
67 | {
68 | IRegion detailRegion = _RegionManager.Regions[RegionNames.DetailRegion];
69 | if (_SelectedIndex == 0)
70 | {
71 | var view = detailRegion.GetView(nameof(OverviewView));
72 | if (view == null)
73 | {
74 | OverviewView newView = _ContainerProvider.Resolve();
75 | detailRegion.Add(newView, nameof(OverviewView));
76 | detailRegion.Activate(newView);
77 | }
78 | else
79 | {
80 | detailRegion.Activate(view);
81 | }
82 | }
83 | else if (_SelectedIndex == 1)
84 | {
85 | var view = detailRegion.GetView(nameof(WeChatLoginView));
86 | if (view == null)
87 | {
88 | WeChatLoginView newView = _ContainerProvider.Resolve();
89 | detailRegion.Add(newView, nameof(WeChatLoginView));
90 | detailRegion.Activate(newView);
91 | }
92 | else
93 | {
94 | detailRegion.Activate(view);
95 | }
96 | }
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/ViewModels/DemoItemViewModel.cs:
--------------------------------------------------------------------------------
1 | using Prism.Commands;
2 | using Prism.Mvvm;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 |
7 | namespace WeUiSharp.Demo.ViewModels
8 | {
9 | public class DemoItemViewModel : BindableBase
10 | {
11 | #region [Properties]
12 | public string Title { get; set; }
13 | public string Icon { get; set; }
14 | #endregion
15 | public DemoItemViewModel()
16 | {
17 |
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/ViewModels/MyCustomDetailViewModel.cs:
--------------------------------------------------------------------------------
1 | using Prism.Commands;
2 | using Prism.Mvvm;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 |
7 | namespace WeUiSharp.Demo.ViewModels
8 | {
9 | public class MyCustomDetailViewModel : BindableBase
10 | {
11 | public MyCustomDetailViewModel()
12 | {
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/ViewModels/MyCustomListViewModel.cs:
--------------------------------------------------------------------------------
1 | using Prism.Commands;
2 | using Prism.Mvvm;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 |
7 | namespace WeUiSharp.Demo.ViewModels
8 | {
9 | public class MyCustomListViewModel : BindableBase
10 | {
11 | public MyCustomListViewModel()
12 | {
13 |
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Src/WeUiSharp.Demo/ViewModels/OverviewViewModel.cs:
--------------------------------------------------------------------------------
1 | using Prism.Commands;
2 | using Prism.Mvvm;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Windows.Controls;
7 | using System.Windows.Input;
8 | using WeUiSharp.Localization;
9 | using WeUiSharp.Models;
10 | using WeUiSharp.Windows;
11 |
12 | namespace WeUiSharp.Demo.ViewModels
13 | {
14 | public class OverviewViewModel : BindableBase
15 | {
16 | #region [Fields]
17 | private List