├── nugetIcon.png
├── .github
└── FUNDING.yml
├── MaterialSkin
├── Resources
│ ├── Roboto-Black.ttf
│ ├── Roboto-Bold.ttf
│ ├── Roboto-Light.ttf
│ ├── Roboto-Medium.ttf
│ ├── Roboto-Thin.ttf
│ └── Roboto-Regular.ttf
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Controls
│ ├── MaterialDivider.cs
│ ├── MaterialTabControl.cs
│ ├── MaterialProgressBar.cs
│ ├── MaterialCheckedListBox.cs
│ ├── MaterialMultiLineTextBox.cs
│ ├── MaterialCard.cs
│ ├── MaterialMessageBox.cs
│ ├── MaterialMenuStrip.cs
│ ├── MaterialForm.resx
│ ├── FlexibleMaterialDialog.resx
│ ├── MaterialLabel.cs
│ ├── MaterialListView.cs
│ ├── MaterialContextMenuStrip.cs
│ ├── BaseTextBox.cs
│ └── MaterialFloatingActionButton.cs
├── IMaterialControl.cs
├── Animations
│ ├── AnimationDirection.cs
│ └── Animations.cs
├── MouseWheelRedirector.cs
├── MaterialItemCollectionEditor.cs
├── MaterialItemCollection.cs
├── Extensions.cs
├── MaterialSkinCore.csproj
├── DrawHelper.cs
├── ColorHelper.cs
└── MaterialSkin.csproj
├── MaterialSkinExample
├── Resources
│ ├── minus.png
│ ├── plus.png
│ ├── round_add_black_24dp.png
│ ├── round_http_white_24dp.png
│ ├── round_backup_white_24dp.png
│ ├── round_build_white_24dp.png
│ ├── round_phone_black_24dp.png
│ ├── baseline_build_black_24dp.png
│ ├── round_bluetooth_white_24dp.png
│ ├── round_bookmark_white_24dp.png
│ ├── round_gps_fixed_white_24dp.png
│ ├── round_swap_vert_white_24dp.png
│ ├── baseline_thumb_up_black_24dp.png
│ ├── round_assessment_white_24dp.png
│ ├── baseline_bluetooth_black_24dp.png
│ ├── baseline_fingerprint_black_24dp.png
│ ├── round_report_problem_white_24dp.png
│ └── baseline_favorite_border_black_24dp.png
├── Icons
│ ├── ic_settings_black_24dp_1x.png
│ └── ic_settings_white_24dp_1x.png
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Program.cs
├── MaterialSkinExample.csproj
└── MainForm.cs
├── LICENSE
├── .nuspec
├── MaterialSkin.sln
├── .gitattributes
├── .gitignore
└── README.md
/nugetIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/nugetIcon.png
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [leocb]
4 |
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Black.ttf
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Light.ttf
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/minus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/minus.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/plus.png
--------------------------------------------------------------------------------
/MaterialSkin/Resources/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkin/Resources/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/MaterialSkinExample/Icons/ic_settings_black_24dp_1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Icons/ic_settings_black_24dp_1x.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Icons/ic_settings_white_24dp_1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Icons/ic_settings_white_24dp_1x.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_add_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_add_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_http_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_http_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_backup_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_backup_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_build_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_build_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_phone_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_phone_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/baseline_build_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/baseline_build_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_bluetooth_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_bluetooth_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_bookmark_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_bookmark_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_gps_fixed_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_gps_fixed_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_swap_vert_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_swap_vert_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/baseline_thumb_up_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/baseline_thumb_up_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_assessment_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_assessment_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/baseline_bluetooth_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/baseline_bluetooth_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/baseline_fingerprint_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/baseline_fingerprint_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/round_report_problem_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/round_report_problem_white_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/Resources/baseline_favorite_border_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/release/MaterialSkin/master/MaterialSkinExample/Resources/baseline_favorite_border_black_24dp.png
--------------------------------------------------------------------------------
/MaterialSkinExample/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/MaterialSkin/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MaterialSkinExample/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MaterialSkinExample/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace MaterialSkinExample
5 | {
6 | internal static class Program
7 | {
8 | [STAThread]
9 | private static void Main()
10 | {
11 | Application.EnableVisualStyles();
12 | Application.SetCompatibleTextRenderingDefault(true);
13 | Application.Run(new MainForm());
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/MaterialSkin/Controls/MaterialDivider.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin.Controls
2 | {
3 | using System.ComponentModel;
4 | using System.Windows.Forms;
5 |
6 | public sealed class MaterialDivider : Control, IMaterialControl
7 | {
8 | [Browsable(false)]
9 | public int Depth { get; set; }
10 |
11 | [Browsable(false)]
12 | public MaterialSkinManager SkinManager => MaterialSkinManager.Instance;
13 |
14 | [Browsable(false)]
15 | public MouseState MouseState { get; set; }
16 |
17 | public MaterialDivider()
18 | {
19 | SetStyle(ControlStyles.SupportsTransparentBackColor, true);
20 | Height = 1;
21 | BackColor = SkinManager.DividersColor;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/MaterialSkin/Controls/MaterialTabControl.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin.Controls
2 | {
3 | using System;
4 | using System.ComponentModel;
5 | using System.Windows.Forms;
6 |
7 | public class MaterialTabControl : TabControl, IMaterialControl
8 | {
9 | public MaterialTabControl()
10 | {
11 | Multiline = true;
12 | }
13 |
14 | [Browsable(false)]
15 | public int Depth { get; set; }
16 |
17 | [Browsable(false)]
18 | public MaterialSkinManager SkinManager => MaterialSkinManager.Instance;
19 |
20 | [Browsable(false)]
21 | public MouseState MouseState { get; set; }
22 |
23 | protected override void WndProc(ref Message m)
24 | {
25 | if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
26 | else base.WndProc(ref m);
27 | }
28 |
29 | protected override void OnControlAdded(ControlEventArgs e)
30 | {
31 | base.OnControlAdded(e);
32 |
33 | e.Control.BackColor = System.Drawing.Color.White;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MaterialSkin/IMaterialControl.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin
2 | {
3 | ///
4 | /// Defines the
5 | ///
6 | public interface IMaterialControl
7 | {
8 | ///
9 | /// Gets or sets the Depth
10 | ///
11 | int Depth { get; set; }
12 |
13 | ///
14 | /// Gets the SkinManager
15 | ///
16 | MaterialSkinManager SkinManager { get; }
17 |
18 | ///
19 | /// Gets or sets the MouseState
20 | ///
21 | MouseState MouseState { get; set; }
22 | }
23 |
24 | ///
25 | /// Defines the MouseState
26 | ///
27 | public enum MouseState
28 | {
29 | ///
30 | /// Defines the HOVER
31 | ///
32 | HOVER,
33 |
34 | ///
35 | /// Defines the DOWN
36 | ///
37 | DOWN,
38 |
39 | ///
40 | /// Defines the OUT
41 | ///
42 | OUT
43 | }
44 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Ignace Maes
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/MaterialSkin/Animations/AnimationDirection.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin.Animations
2 | {
3 | ///
4 | /// Defines the AnimationDirection
5 | ///
6 | internal enum AnimationDirection
7 | {
8 | ///
9 | /// Defines the In
10 | ///
11 | In, //In. Stops if finished.
12 |
13 | ///
14 | /// Defines the Out
15 | ///
16 | Out, //Out. Stops if finished.
17 |
18 | ///
19 | /// Defines the InOutIn
20 | ///
21 | InOutIn, //Same as In, but changes to InOutOut if finished.
22 |
23 | ///
24 | /// Defines the InOutOut
25 | ///
26 | InOutOut, //Same as Out.
27 |
28 | ///
29 | /// Defines the InOutRepeatingIn
30 | ///
31 | InOutRepeatingIn, // Same as In, but changes to InOutRepeatingOut if finished.
32 |
33 | ///
34 | /// Defines the InOutRepeatingOut
35 | ///
36 | InOutRepeatingOut// Same as Out, but changes to InOutRepeatingIn if finished.
37 | }
38 | }
--------------------------------------------------------------------------------
/MaterialSkin/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 MaterialSkin.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MaterialSkinExample/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 MaterialSkinExample.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MaterialSkin.2
5 | 2.3.1
6 | MaterialSkin 2
7 | leocb, IgnaceMaes, orapps44
8 | leocb
9 | MIT
10 | https://github.com/leocb/MaterialSkin
11 | images\nugetIcon.png
12 | false
13 | Google's Material Design for your windows forms.
14 | see github page for release notes
15 | Copyright Leonardo C Bottaro © 2021
16 | material design materialdesign google forms theme skin
17 |
18 |
19 |
20 | The MaterialSkin 2 is a Google's Material Design skin for you windows forms app. this updated version brings new user controls, unified theming and consistency. This package superseeds the MaterialSkin package By IgnaceMaes. Example app and documentation is available on the project site.
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/MaterialSkinExample/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("MaterialSkinExample")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("MaterialSkinExample")]
12 | [assembly: AssemblyCopyright("Copyright © 2014")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("b3fe1c46-7ac9-4dc9-bfe7-f66f3136e410")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/MaterialSkin/Controls/MaterialProgressBar.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin.Controls
2 | {
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Windows.Forms;
6 |
7 | public class MaterialProgressBar : ProgressBar, IMaterialControl
8 | {
9 | public MaterialProgressBar()
10 | {
11 | SetStyle(ControlStyles.UserPaint, true);
12 | SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
13 | }
14 |
15 | [Browsable(false)]
16 | public int Depth { get; set; }
17 |
18 | [Browsable(false)]
19 | public MaterialSkinManager SkinManager => MaterialSkinManager.Instance;
20 |
21 | [Browsable(false)]
22 | public MouseState MouseState { get; set; }
23 |
24 | protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
25 | {
26 | base.SetBoundsCore(x, y, width, 5, specified);
27 | }
28 |
29 | protected override void OnPaint(PaintEventArgs e)
30 | {
31 | var doneProgress = (int)(Width * ((double)Value / Maximum));
32 | e.Graphics.FillRectangle(Enabled ?
33 | SkinManager.ColorScheme.PrimaryBrush :
34 | new SolidBrush(DrawHelper.BlendColor(SkinManager.ColorScheme.PrimaryColor, SkinManager.SwitchOffDisabledThumbColor, 197)),
35 | 0, 0, doneProgress, Height);
36 | e.Graphics.FillRectangle(SkinManager.BackgroundFocusBrush, doneProgress, 0, Width - doneProgress, Height);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/MaterialSkin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("MaterialSkin")]
9 | [assembly: AssemblyDescription("Google's Material Design on your windows forms")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("MaterialSkin")]
13 | [assembly: AssemblyCopyright("Copyright Leonardo C Bottaro © 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("52781de3-a323-49ee-9a4f-c67280f8d328")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2.3.1.0")]
36 | [assembly: AssemblyFileVersion("2.3.1.0")]
37 | [assembly: NeutralResourcesLanguage("en-US")]
38 |
--------------------------------------------------------------------------------
/MaterialSkin.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.136
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialSkinExample", "MaterialSkinExample\MaterialSkinExample.csproj", "{47409AA5-62AE-4189-8E83-C471502DF5E9}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialSkin", "MaterialSkin\MaterialSkin.csproj", "{8EB7611B-68CD-4B8B-987A-11717E2B250C}"
9 | EndProject
10 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{17028688-3699-4BC7-849F-A6B0F6E766BC}"
11 | ProjectSection(SolutionItems) = preProject
12 | README.md = README.md
13 | EndProjectSection
14 | EndProject
15 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaterialSkinCore", "MaterialSkin\MaterialSkinCore.csproj", "{031DCCA6-79CD-41F0-AA5A-09FDE1C1D308}"
16 | EndProject
17 | Global
18 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
19 | Debug|Any CPU = Debug|Any CPU
20 | Release|Any CPU = Release|Any CPU
21 | EndGlobalSection
22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
25 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
26 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.Build.0 = Release|Any CPU
27 | {8EB7611B-68CD-4B8B-987A-11717E2B250C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28 | {8EB7611B-68CD-4B8B-987A-11717E2B250C}.Debug|Any CPU.Build.0 = Debug|Any CPU
29 | {8EB7611B-68CD-4B8B-987A-11717E2B250C}.Release|Any CPU.ActiveCfg = Release|Any CPU
30 | {8EB7611B-68CD-4B8B-987A-11717E2B250C}.Release|Any CPU.Build.0 = Release|Any CPU
31 | {031DCCA6-79CD-41F0-AA5A-09FDE1C1D308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32 | {031DCCA6-79CD-41F0-AA5A-09FDE1C1D308}.Debug|Any CPU.Build.0 = Debug|Any CPU
33 | {031DCCA6-79CD-41F0-AA5A-09FDE1C1D308}.Release|Any CPU.ActiveCfg = Release|Any CPU
34 | {031DCCA6-79CD-41F0-AA5A-09FDE1C1D308}.Release|Any CPU.Build.0 = Release|Any CPU
35 | EndGlobalSection
36 | GlobalSection(SolutionProperties) = preSolution
37 | HideSolutionNode = FALSE
38 | EndGlobalSection
39 | GlobalSection(ExtensibilityGlobals) = postSolution
40 | SolutionGuid = {0DF2ED56-BB31-432A-BE76-7C00E7541216}
41 | EndGlobalSection
42 | EndGlobal
43 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/MaterialSkin/Controls/MaterialCheckedListBox.cs:
--------------------------------------------------------------------------------
1 | namespace MaterialSkin.Controls
2 | {
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Drawing;
6 | using System.Windows.Forms;
7 |
8 | public class MaterialCheckedListBox : Panel, IMaterialControl
9 | {
10 | [Browsable(false)]
11 | public int Depth { get; set; }
12 |
13 | [Browsable(false)]
14 | public MaterialSkinManager SkinManager => MaterialSkinManager.Instance;
15 |
16 | [Browsable(false)]
17 | public MouseState MouseState { get; set; }
18 |
19 | public bool Striped { get; set; }
20 |
21 | public Color StripeDarkColor { get; set; }
22 |
23 | public ItemsList Items { get; set; }
24 |
25 | public MaterialCheckedListBox() : base()
26 | {
27 | this.DoubleBuffered = true;
28 | this.Items = new ItemsList(this);
29 | this.AutoScroll = true;
30 | }
31 |
32 | protected override void OnCreateControl()
33 | {
34 | base.OnCreateControl();
35 | if (DesignMode)
36 | {
37 | BackColorChanged += (sender, args) => BackColor = Parent.BackColor;
38 | BackColor = Parent.BackColor;
39 | }
40 | else
41 | {
42 | BackColorChanged += (sender, args) => BackColor = DrawHelper.BlendColor(Parent.BackColor, SkinManager.BackgroundAlternativeColor, SkinManager.BackgroundAlternativeColor.A);
43 | BackColor = DrawHelper.BlendColor(Parent.BackColor, SkinManager.BackgroundAlternativeColor, SkinManager.BackgroundAlternativeColor.A);
44 | }
45 | }
46 |
47 | public CheckState GetItemCheckState(int Index)
48 | {
49 | return Items[Index].CheckState;
50 | }
51 |
52 | public class ItemsList : List
53 | {
54 | private Panel _parent;
55 |
56 | public ItemsList(Panel parent)
57 | {
58 | _parent = parent;
59 | }
60 |
61 | public delegate void SelectedIndexChangedEventHandler(int Index);
62 |
63 | public void Add(string text)
64 | {
65 | Add(text, false);
66 | }
67 |
68 | public void Add(string text, bool defaultValue)
69 | {
70 | MaterialSkin.Controls.MaterialCheckbox cb = new MaterialSkin.Controls.MaterialCheckbox();
71 | Add(cb);
72 | cb.Checked = defaultValue;
73 | cb.Text = text;
74 | }
75 |
76 | public new void Add(MaterialSkin.Controls.MaterialCheckbox value)
77 | {
78 | base.Add(value);
79 | _parent.Controls.Add(value);
80 | value.Dock = DockStyle.Top;
81 | }
82 |
83 | public new void Remove(MaterialSkin.Controls.MaterialCheckbox value)
84 | {
85 | base.Remove(value);
86 | _parent.Controls.Remove(value);
87 | }
88 | }
89 | }
90 | }
--------------------------------------------------------------------------------
/MaterialSkin/MouseWheelRedirector.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Globalization;
5 | using System.IO;
6 | using System.Linq;
7 | using System.Reflection;
8 | using System.Runtime.CompilerServices;
9 | using System.Security;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 | using Microsoft.VisualBasic;
13 | using System.Windows.Forms;
14 | using System.Runtime.InteropServices;
15 |
16 | public class MouseWheelRedirector : IMessageFilter
17 | {
18 | private static MouseWheelRedirector instance = null;
19 | private static bool _active = false;
20 |
21 | public static bool Active
22 | {
23 | set
24 | {
25 | if (_active != value)
26 | {
27 | _active = value;
28 | if (_active)
29 | {
30 | if (instance == null)
31 | instance = new MouseWheelRedirector();
32 | Application.AddMessageFilter(instance);
33 | }
34 | else if (instance != null)
35 | Application.RemoveMessageFilter(instance);
36 | }
37 | }
38 | get
39 | {
40 | return _active;
41 | }
42 | }
43 |
44 | public static void Attach(Control control)
45 | {
46 | if (!_active)
47 | Active = true;
48 | control.MouseEnter += instance.ControlMouseEnter;
49 | control.MouseLeave += instance.ControlMouseLeaveOrDisposed;
50 | control.Disposed += instance.ControlMouseLeaveOrDisposed;
51 | }
52 |
53 | public static void Detach(Control control)
54 | {
55 | if (instance == null)
56 | return;
57 | control.MouseEnter -= instance.ControlMouseEnter;
58 | control.MouseLeave -= instance.ControlMouseLeaveOrDisposed;
59 | control.Disposed -= instance.ControlMouseLeaveOrDisposed;
60 | if (instance.currentControl == control)
61 | instance.currentControl = null;
62 | }
63 |
64 | public MouseWheelRedirector()
65 | {
66 | }
67 |
68 | private Control currentControl;
69 |
70 | private void ControlMouseEnter(object sender, System.EventArgs e)
71 | {
72 | var control = (Control)sender;
73 | if (!control.Focused)
74 | currentControl = control;
75 | else
76 | currentControl = null;
77 | }
78 |
79 | private void ControlMouseLeaveOrDisposed(object sender, System.EventArgs e)
80 | {
81 | if (currentControl == sender)
82 | currentControl = null;
83 | }
84 |
85 | private const int WM_MOUSEWHEEL = 0x20A;
86 | public bool PreFilterMessage(ref System.Windows.Forms.Message m)
87 | {
88 | if (currentControl != null && m.Msg == WM_MOUSEWHEEL)
89 | {
90 | SendMessage(currentControl.Handle, m.Msg, m.WParam, m.LParam);
91 | return true;
92 | }
93 | else
94 | return false;
95 | }
96 |
97 | [DllImport("user32.dll", SetLastError = false)]
98 | private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
99 | }
100 |
--------------------------------------------------------------------------------
/MaterialSkin/MaterialItemCollectionEditor.cs:
--------------------------------------------------------------------------------
1 | #region Imports
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Drawing;
7 | using System.Drawing.Design;
8 | using System.ComponentModel;
9 | using System.ComponentModel.Design;
10 | using MaterialSkin;
11 | //using MaterialSkin.Controls;
12 |
13 | using System.Drawing.Text;
14 | using System.Windows.Forms;
15 | using System.Collections;
16 | using System.Collections.ObjectModel;
17 | using System.Runtime.InteropServices;
18 |
19 |
20 | #endregion
21 |
22 | namespace System.Windows.Forms
23 | {
24 | public class MaterialItemCollectionEditor : CollectionEditor
25 | {
26 | public MaterialItemCollectionEditor() : base(typeof(MaterialItemCollection))
27 | {
28 |
29 | }
30 |
31 | protected override Type CreateCollectionItemType()
32 | {
33 | return typeof(MaterialListBoxItem);
34 | }
35 |
36 | protected override Type[] CreateNewItemTypes()
37 | {
38 | return new Type[] {
39 | typeof(MaterialListBoxItem)
40 | };
41 | }
42 | }
43 |
44 | //public class MaterialItemCollectionEditor : CollectionEditor
45 | //{
46 | // // Define a static event to expose the inner PropertyGrid's
47 | // // PropertyValueChanged event args...
48 | // public delegate void MyPropertyValueChangedEventHandler(object sender,
49 | // PropertyValueChangedEventArgs e);
50 | // public static event MyPropertyValueChangedEventHandler MyPropertyValueChanged;
51 |
52 | // // Inherit the default constructor from the standard
53 | // // Collection Editor...
54 | // public MyCollectionEditor(Type type) : base(type) { }
55 |
56 | // // Override this method in order to access the containing user controls
57 | // // from the default Collection Editor form or to add new ones...
58 | // protected override CollectionForm CreateCollectionForm()
59 | // {
60 | // // Getting the default layout of the Collection Editor...
61 | // CollectionForm collectionForm = base.CreateCollectionForm();
62 | // Form frmCollectionEditorForm = collectionForm as Form;
63 | // TableLayoutPanel tlpLayout = frmCollectionEditorForm.Controls[0] as TableLayoutPanel;
64 |
65 | // if (tlpLayout != null)
66 | // {
67 | // // Get a reference to the inner PropertyGrid and hook
68 | // // an event handler to it.
69 | // if (tlpLayout.Controls[5] is PropertyGrid)
70 | // {
71 | // PropertyGrid propertyGrid = tlpLayout.Controls[5] as PropertyGrid;
72 | // propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(propertyGrid_PropertyValueChanged);
73 | // }
74 | // }
75 | // return collectionForm;
76 | // }
77 |
78 | // void propertyGrid_PropertyValueChanged(object sender, PropertyValueChangedEventArgs e)
79 | // {
80 | // // Fire our customized collection event...
81 | // if (MyCollectionEditor.MyPropertyValueChanged != null)
82 | // {
83 | // MyCollectionEditor.MyPropertyValueChanged(this, e);
84 | // }
85 | // }
86 | //}
87 | }
88 |
--------------------------------------------------------------------------------
/MaterialSkin/MaterialItemCollection.cs:
--------------------------------------------------------------------------------
1 | #region Imports
2 |
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Collections.ObjectModel;
6 | using System.ComponentModel;
7 | using System.Drawing.Design;
8 | using System.Windows.Forms;
9 |
10 | #endregion
11 |
12 | namespace MaterialSkin
13 | {
14 | #region MaterialItemCollectionChild
15 |
16 | [Editor(typeof(MaterialItemCollectionEditor), typeof(UITypeEditor))]
17 | public class MaterialItemCollection : Collection