- [DEVEXPRESS] Hướng dẫn bật tính năng Scroll Pixcel in Touch trên GridView
- [DEVEXPRESS] Hướng dẫn sử dụng TileBar viết ứng dụng duyệt hình ảnh Winform
- [DEVEXPRESS] Tô màu border TextEdit trên Winform
- [C#] Lấy dữ liệu từ Console Write hiển thị lên textbox Winform
- [C#] Hiển thị Progress bar trên Window Console
- [C#] Di chuyển control Runtime và lưu layout trên winform
- [SQLSERVER] Sử dụng hàm NULL IF
- [C#] Chia sẽ source code mã đi tuần bằng giao diện Winform
- [C#] Flash Window in Taskbar Winform
- Download và Giải nén tập tin File sử dụng Powershell
- [C#] Hướng dẫn cách lấy thông tin đăng nhập tài khoản và mật khẩu web browser trên windows
- [VB.NET] CRUD Thêm xóa sửa tìm kiếm Realtime FireBase
- [C#] Hiển thị thông báo Toast Message trong lập trình Winform
- [C#] Cấu hình định dạng ngày tháng, thời gian trên Windows cho ứng dụng Winform
- [C#] Rút gọn đường dẫn link url với TinyURL API
- [C#] Hướng dẫn cách bo tròn winform with Radius
- [C#] Chia sẽ class BackGroundOverlay Show Modal cho Winform
- [C#] Hướng dẫn Flip Image Winform
- [C#] Invoke là gì? cách sử dụng phương thức Invoke()
- [C#] Hướng dẫn chia sẽ file, folder từ ứng dụng sang Zalo Chat
[DEVEXPRESS] Hướng dẫn sử dụng Color Mixer để thay đổi giao diện winform
Bài viết hôm nay, mình sẽ hướng dẫn các bạn cách thay đổi giao diện màu sắc của winform Devexpress sử dụng Color Mixer. Trong bài viết trước, mình đã có bài viết hướng dẫn các bạn cách thay đổi giao diện sử dụng công cụ Look and Feel.
Các bạn có thể tham khảo bài viết ở đây:
[DEVEXPRESS] Hướng dẫn thay đổi giao diện sử dụng Look and Feel C#
Dưới đây, mình sẽ bật giao diện Dialog Color Mixer để lấy màu sắc.
Dưới đây là hình ảnh demo ứng dụng:
Trong bài viết, mình cấu hình sử dụng 2 biến: color1 và color2 để lưu lại cấu hình giao diện của winform
Source code lập trình C#:
using DevExpress.Skins;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DXApplication1
{
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
defaultLookAndFeel1.LookAndFeel.SetSkinMaskColors(Color.FromArgb(Properties.Settings.Default.color1), Color.FromArgb(Properties.Settings.Default.color2));
}
private void simpleButton1_Click(object sender, EventArgs e)
{
using (DevExpress.XtraEditors.ColorWheel.ColorWheelForm f = new DevExpress.XtraEditors.ColorWheel.ColorWheelForm())
{
f.ShowDialog(this);
}
Skin skin = CommonSkins.GetSkin(DevExpress.LookAndFeel.UserLookAndFeel.Default.ActiveLookAndFeel);
Properties.Settings.Default.color1 = skin.MaskColor.ToArgb();
Properties.Settings.Default.color2 = skin.MaskColor2.ToArgb();
Properties.Settings.Default.Save();
}
}
}
HAVE FUN :)