Introduction
Home
Essentials
Introduction
What is minimal library?
Minimal library is a toolkit of the Windows Forms user-interface components. Unlike other 3rd party libraries, Minimal was build with newest design trends in mind. In additon to about 14 modern UI components is library also providing support for colors in HEX format, custom color themes, touch input, enhanced UI scaling engine and many more!
Give it a shot!
The easiest way to try out Minimal library is using the pre-build example project. Feel free to download and discover by yourself, what Minimal library can offer to you. If you don’t have access to Visual Studio right now, you can always dig in to the demos.
Instalation
The official guide assumes intermediate level knowledge of C# / .NET and Windows Forms. If you are totally new to C# development, it might not be the best idea to jump right into a library as your first step - grasp the basics then come back! Prior experience with other libraries helps, but is not required.
In order to successfuly setup Minimal library you need to add it to your project references. You can start with the new WinForm project or integrate the library to existing one. If you are using Visual Studio 2017, adding this library to your references can be done by simply right-clicking on the Reference item in your Solution Explorer, choosing Add reference, and then Browse. After selecting the .dll file downloaded from this website, you should be able to see all newly added controls (M-Controls) in a toolbox window. As the last step, you need to enable the library itself. This can be done by simply calling M.EnableMinimall() in the Program.cs file right before your Application.Run() method call. See the code example below:
using Minimal;
using System;
using System.Windows.Forms;
namespace Demo
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Enables minimal library
M.EnableMinimal();
Application.Run(new Main());
}
}
}
using Minimal;
using System;
using System.Windows.Forms;
namespace Demo
{
public partial class Form : MForm // <- Inherite from MForm class if possible
{
// Form constructor
public Form()
{
InitializeComponent();
}
}
}
Calling M.EnableMinimall() is necessary, because it initializes update pipe-line for every component from library. It is also a good practice to inherit your forms from MForm class if possible. This makes usage of the library simpler and it helps you to avoid inconveniences in future. If you are using library with an existing project, we suggest you to read a compatibility section below.
Compatibility
Minimal library is designed from the ground up to be incrementally adoptable. The core library is focused on the front-end only, and is easy to pick up and integrate with other libraries or existing projects. Library provides own MForm class, but all components can be used on standard forms deriving from System.Windows.Forms.Form if necessary. To avoid name collisions, all the components from Minimal library are pre-fixed with M letter - e. g. MButton.