๋ฐ˜์‘ํ˜•

์†Œ๊ฐœ

MFC ๊ธฐ๋ฐ˜์—์„œ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค ๋•Œ UI ์ž‘์—…์ด ์ƒ๊ฐ๋ณด๋‹ค ๊ฝค ๋งŽ์€ ์‹œ๊ฐ„์„ ์ฐจ์ง€ํ•ฉ๋‹ˆ๋‹ค. ์ปจํŠธ๋กค ์ƒ‰์ƒ์ด๋‚˜ ๋งˆ์šฐ์Šค ๋™์ž‘์— ๋”ฐ๋ฅธ ํšจ๊ณผ๋ฅผ ์ ์šฉํ•˜๊ธฐ๊ฐ€ ์‰ฝ์ง€ ์•Š๊ณ , ๋ญ๋“ ์ง€ ์‚ฌ์šฉ์ž๊ฐ€ ์•Œ์•„์„œ ๊ฐœ๋ฐœํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด์ฃ . ์ด์— ๋ฐ˜ํ•ด C#์€ UI ์ ์šฉ์ด ์ •๋ง ํŽธํ•ฉ๋‹ˆ๋‹ค. ํฌ๊ธฐ๋‚˜ ์œ„์น˜ ์กฐ์ •, ์ƒ‰์ƒ ๋“ฑ MFC ๋ณด๋‹ค ๋” ๋งŽ์€ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ MFC์˜ ๋ถˆํŽธํ•จ์— ๋”ฐ๋ฅธ ๊ธฐ๋Œ€๊ฐ์ด ๋†’์€ ๊ฒƒ ๋•Œ๋ฌธ์ธ์ง€, ๊ฐœ์ธ์ ์œผ๋กœ ๊ทธ๋ ‡๊ฒŒ ๋งŽ์ด ๋งŒ์กฑ์Šค๋Ÿฝ์ง„ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ๊ฒฐ๊ตญ์— ์˜ˆ์˜๊ฒŒ UI๋ฅผ ๊พธ๋ฏธ๊ณ  ์‹ถ์œผ๋ฉด ์„œ๋ธŒ ํด๋ž˜์‹ฑ์„ ํ•ด์•ผ ํ•˜๋”๊ตฐ์š”.

์ด๋Ÿฐ ๋ถ€์กฑํ•จ์„ ์ฑ„์›Œ์ฃผ๊ธฐ ์œ„ํ•œ Metro UI(Modern UI)๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฌด๋ฃŒ์ด๋ฉฐ ์›ฌ๋งŒํ•œ ์‚ฌ์šฉ์ž๋“ค์€ ๋งŒ์กฑํ• ๋งŒํ•œ ๊ธฐ๋Šฅ์„ ์ถฉ๋ถ„ํžˆ ์ œ๊ณตํ•˜๋Š” UI ํ”„๋ ˆ์ž„์›Œํฌ์ž…๋‹ˆ๋‹ค. ๋ณธ๊ฒฉ์ ์œผ๋กœ ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Metro UI๋ž€?

์šฐ์„  ์œ„ํ‚ค๋ฐฑ๊ณผ์˜ ์ •์˜๋ถ€ํ„ฐ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

๋ฉ”ํŠธ๋กœ(Metro)๋Š” ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ๊ฐ€ ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ ๊ธฐ๋ฐ˜์˜ ๋””์ž์ธ ์–ธ์–ด์˜ ๋‚ด๋ถ€ ์ฝ”๋“œ๋ช…์ด๋‹ค. ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ ๋‚ด๋ถ€์ ์œผ๋กœ๋Š” ๋ฒ•์  ๋ฌธ์ œ๋กœ ์ธํ•ด ์ž„์‹œ์ ์œผ๋กœ '๋ชจ๋˜ UI'(Modern UI)๋ผ๋Š” ์šฉ์–ด๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋‹ค. ์œˆ๋„์šฐ 10์ด ๋ ˆ๋“œ์Šคํ†ค 2๊นŒ์ง€๋Š” ๋ฉ”ํŠธ๋กœ์˜€๋Š”๋ฐ ๋ ˆ๋“œ์Šคํ†ค 3๋ถ€ํ„ฐ ํ”Œ๋ฃจ์–ธํŠธ ๋””์ž์ธ์œผ๋กœ ๋ฐ”๋€Œ์—ˆ๋‹ค.

์ฆ‰, ๋งˆ์ดํฌ๋กœ์†Œํ”„ํŠธ๊ฐ€ ์‚ฌ์šฉํ•œ UI ํ”„๋ ˆ์ž„์›Œํฌ์ธ๋ฐ์š”. ์‚ฌ๊ฐํ˜• ํƒ€์ผ ๋ชจ์–‘์˜ ๋ฒ„ํŠผ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•œ UI๋ผ๊ณ  ์ดํ•ดํ•˜๋ฉด ๋˜๊ฒ ์Šต๋‹ˆ๋‹ค. ์•„๋งˆ ๊ฐ€์žฅ ๋งŽ์ด ์ ‘ํ•œ ๊ฒฝํ—˜์€ ์œˆ๋„์šฐ 8์ด๋ผ๊ณ  ์ƒ๊ฐ์ด ๋ฉ๋‹ˆ๋‹ค.

์ถœ์ฒ˜: PCWorld

๊ทธ๋ž˜์„œ .Net WinForm์„ ์œ„ํ•œ Window Modern UI๋ฅผ ์ ์šฉํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ํšจ๊ณผ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Light Theme๋ฅผ ์ ์šฉํ•œ UI
Black Theme๋ฅผ ์ ์šฉํ•œ UI

MetroFramework์— ๋Œ€ํ•œ ์ž์„ธํ•œ ํŠน์ง•์€ ์•„๋ž˜ ๋งํฌ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋งํฌ: thielj.github.io/MetroFramework/#Screensots

 

Metroframework

Add a fresh look to your .NET WinForms application with controls using the Modern 'Metro' UI theme of Windows 8. This work is based on software from the winforms-modernui project. Changes and additions include: Custom themes (see themes.xml) Conversion int

thielj.github.io

๋”ฐ๋ผ ํ•˜๊ธฐ

๋ณธ๊ฒฉ์ ์œผ๋กœ WinForm์— Metro UI๋ฅผ ์ ์šฉํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Visual Studio๋ฅผ ์‹คํ–‰ํ•˜๊ณ  Windows Forms ์•ฑ์„ ์„ ํƒํ•˜์—ฌ ExamMetroUI๋ผ๋Š” ์ด๋ฆ„์˜ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

Windows Forms ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

์šฐ๋ฆฌ๊ฐ€ ํ”ํžˆ ๋ณด๋˜ C# WinForm์ด ๋ณด์ž…๋‹ˆ๋‹ค.

๊ธฐ๋ณธ WinForm UI ํ™”๋ฉด

Metro UI๋Š” NuGet์„ ํ†ตํ•ด ์‰ฝ๊ฒŒ ์„ค์น˜๊ฐ€ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์ด ์†”๋ฃจ์…˜์šฉ NuGet ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์†”๋ฃจ์…˜์šฉ NuGet ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ๋ฉ”๋‰ด ํด๋ฆญ

๊ฒ€์ƒ‰๋ž€์— metroui๋ฅผ ๊ฒ€์ƒ‰ํ•˜๋ฉด ์—ฌ๋Ÿฌ ํ•ญ๋ชฉ์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ๊ทธ ์ค‘ MetroModernUI๋ฅผ ์„ ํƒํ•˜๊ณ , ์•„๋ž˜์™€ ๊ฐ™์ด ์ฒดํฌ๋ฐ•์Šค ์ฒดํฌ ํ›„ ์„ค์น˜ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

MetroModernUI ์„ค์น˜

์„ค์น˜ ํ›„ ํ”„๋กœ์ ํŠธ ์ฐธ์กฐ์— MetroFramework ๊ด€๋ จ dll์ด ์ถ”๊ฐ€๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

MetroFramework dll์ด ์ถ”๊ฐ€๋œ ๋ชจ์Šต

๊ทธ๋ฆฌ๊ณ  Form ๋””์ž์ธ ํ™”๋ฉด์˜ ๋„๊ตฌ ์ƒ์ž๋ฅผ ๋ณด๋ฉด, ์•„๋ž˜์™€ ๊ฐ™์ด Metro ๊ด€๋ จ UI ์ปจํŠธ๋กค์ด ์ถ”๊ฐ€๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Metro UI Control์ด ์ถ”๊ฐ€๋œ ๋ชจ์Šต

์ด์ œ Form1.cs์—์„œ ์•„๋ž˜์™€ ๊ฐ™์ด ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ExamMetroUI
{
    public partial class Form1 : MetroFramework.Forms.MetroForm //์ƒ์† ํด๋ž˜์Šค ๋ณ€๊ฒฝ
    {
        public Form1()
        {
            InitializeComponent();
        }
    }
}

๊ทธ๋ฆฌ๊ณ  Form1.cs[๋””์ž์ธ]์„ ๋ณด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋ณ€๊ฒฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

Form์— Metro UI๊ฐ€ ์ ์šฉ๋œ ๋ชจ์Šต

์ด์ œ Metro UI Control์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๊ธฐ๋ณธ UI๋ณด๋‹ค ์˜ˆ์˜๊ฒŒ ๊พธ๋ฐ€ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Metro UI Control ์˜ˆ์‹œ

์•„๋ž˜ ์˜ˆ์ œ ์ฝ”๋“œ๋Š” ๋ณธ๋ฌธ์—์„œ ๋ณด์—ฌ์ค€ ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

ExamMetroUI.zip
0.90MB

๋ฐ˜์‘ํ˜•