LunarPresentation/Expressions/Grid.cs

(开头部分) 35KB

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

using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Xml;
using SHomeWorkshop.LunarPresentation.Interfaces;
using SHomeWorkshop.LunarPresentation.Widegets;
using WPF = System.Windows.Controls;

namespace SHomeWorkshop.LunarPresentation.Expressions
{
    public class Grid : Expression, ICollapsed
    {
        public Grid(SubPanel rootPanel, SubPanel parentPanel, Editor editor) :
            base(rootPanel, parentPanel, editor)
        {
            this.baseGrid = new WPF.Grid() { Margin = cMargin };
            this.mainBorder.Child = this.baseGrid;
            this.subPanels = new List<SubPanel>();

            //this.baseGrid.RowDefinitions.Add(new WPF.RowDefinition());
            //this.baseGrid.ColumnDefinitions.Add(new WPF.ColumnDefinition());

            this.chineseName = "网格式";
            this.borderColor = null;
        }

        private static Thickness cMargin = new Thickness(1);

        private static Thickness noMargin = new Thickness(0);

        private WPF.Grid baseGrid;

        public WPF.Grid BaseGrid
        {
            get { return baseGrid; }
        }

        private int linesCount = 1;

        public int LinesCount
        {
            get { return linesCount; }
            set
            {
                if (value >= 1)
                {
                    linesCount = value;
                    this.XmlData.SetAttribute("LinesCount", linesCount.ToString());

                    UpdateRowDefinitions(value);
                }
            }
        }

        private int columnsCount = 1;

        public int ColumnsCount
        {
后面还有 907 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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