LunarPresentation/Expressions/GridPanel.cs
(开头部分) 25KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Windows;
using System.Xml;
using WPF = System.Windows.Controls;
using System.Windows.Media;
namespace SHomeWorkshop.LunarPresentation.Expressions
{
public class GridPanel : SubPanel
{
public GridPanel(SubPanel rootPanel, SubPanel parentPanel,
Editor editor, Expression parentExpression)
: base(rootPanel, parentPanel, editor, parentExpression)
{
HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
this.chineseName = "网格子面板";
this.Margin = cMargin;
this.borderColor = null;
}
public enum GridPanelAlignment
{
TopLeft, TopCenter, TopRight,
Left, Center, Right,
BottomLeft, BottomCenter, BottomRight
}
private GridPanelAlignment panelAlign = GridPanelAlignment.TopLeft;
public GridPanelAlignment PanelAlign
{
get { return panelAlign; }
set
{
panelAlign = value;
this.XmlData.SetAttribute("PanelAlign", value.ToString());
RefreshGridPanelAlign();
}
}
private void RefreshGridPanelAlign()
{
switch (panelAlign)
{
case GridPanelAlignment.TopLeft:
{
this.basePanel.HorizontalAlignment = HorizontalAlignment.Stretch;
this.basePanel.VerticalAlignment = VerticalAlignment.Stretch;
break;
}
case GridPanelAlignment.TopCenter:
{
this.basePanel.HorizontalAlignment = HorizontalAlignment.Center;
this.basePanel.VerticalAlignment = VerticalAlignment.Stretch;
break;
}
后面还有 701 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。