PropertyGridDemoModel.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using HandyControl.Controls;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows;
using System.Windows.Media;
using Color = System.Drawing.Color;
using FontFamily = System.Drawing.FontFamily;

namespace WpfMind
{
    public delegate void ModelChanged(object sender);
    public class PropertyGridDemoModel
    {
        public event ModelChanged OnChanged;
        private int radius;
        private Family fontfamily;
        private int fontsize;
        private System.Drawing.FontStyle fontstyle;
        private ModelColor color;
        [Category("样式")]
        public int 圆角半径 {
            get { return radius; }
            set
            {
                Console.WriteLine("圆角半径:"+value.ToString());
                radius = value;
                if (OnChanged != null)
                {
                    OnChanged(this);
                }
            }
        }
        [Category("文本")]
        public Family 字体
        {
            get { return fontfamily; }
            set { fontfamily = value;
                if (OnChanged != null)
                {
                    OnChanged(this);
                }
            }
        }
        public int 大小
        {
            get { return fontsize; }
            set
            {
                fontsize = value;
                if (OnChanged != null)
                {
                    OnChanged(this);
                }
            }
        }
        public System.Drawing.FontStyle 字体样式
        {
            get { return fontstyle; }
            set { fontstyle = value;
后面还有 188 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。