From 2e889843b4c171f2d6ad8e0d53084040703d11f6 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 13:18:21 +0800
Subject: [PATCH] docs: CAN 总线级应答器 + 硬件调试页多标签多会话 设计规格
---
HMI.UI/DpUtil/GridHelper.cs | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/HMI.UI/DpUtil/GridHelper.cs b/HMI.UI/DpUtil/GridHelper.cs
index 4b030a9..b650dc8 100644
--- a/HMI.UI/DpUtil/GridHelper.cs
+++ b/HMI.UI/DpUtil/GridHelper.cs
@@ -90,9 +90,9 @@
}
var rowCount = grid.RowDefinitions.Count;
- rowCount = rowCount<= 0 ? 1 : rowCount;
+ rowCount = rowCount <= 0 ? 1 : rowCount;
var columnCount = grid.ColumnDefinitions.Count;
- columnCount = columnCount<=0 ? 1 : columnCount;
+ columnCount = columnCount <= 0 ? 1 : columnCount;
int totalCount = rowCount * columnCount;
if (grid.Children == null) return;
@@ -118,45 +118,46 @@
}
#endregion
- public static Brush GetInnerBorderBrush(DependencyObject obj)
+ public static Brush GetInnerBorderBrush(Grid obj)
{
return (Brush)obj.GetValue(InnerBorderBrushProperty);
}
- public static void SetInnerBorderBrush(DependencyObject obj, Brush value)
+ public static void SetInnerBorderBrush(Grid obj, Brush value)
{
obj.SetValue(InnerBorderBrushProperty, value);
}
public static readonly DependencyProperty InnerBorderBrushProperty =
- DependencyProperty.RegisterAttached("InnerBorderBrush", typeof(Brush), typeof(Grid),
+ DependencyProperty.RegisterAttached("InnerBorderBrush", typeof(Brush), typeof(GridHelper),
new PropertyMetadata(null, OnInnerBorderChanged));
- public static double GetInnerBorder(DependencyObject obj)
+ public static double GetInnerBorder(Grid obj)
{
- return (double)obj.GetValue(InnerBorderProperty);
+ var sb = obj.GetValue(InnerBorderProperty);
+ return double.Parse(sb.ToString());
}
- public static void SetInnerBorder(DependencyObject obj, object value)
+ public static void SetInnerBorder(Grid obj, object value)
{
double dv = double.Parse(value.ToString());
obj.SetValue(InnerBorderProperty, dv);
}
public static readonly DependencyProperty InnerBorderProperty =
- DependencyProperty.RegisterAttached("InnerBorder", typeof(object), typeof(Grid),
+ DependencyProperty.RegisterAttached("InnerBorder", typeof(object), typeof(GridHelper),
new PropertyMetadata(0, OnInnerBorderChanged));
- public static string GetInnerBorderIgnore(DependencyObject obj)
+ public static string GetInnerBorderIgnore(Grid obj)
{
return (string)obj.GetValue(InnerBorderIgnoreProperty);
}
- public static void SetInnerBorderIgnore(DependencyObject obj, string value)
+ public static void SetInnerBorderIgnore(Grid obj, string value)
{
obj.SetValue(InnerBorderIgnoreProperty, value);
}
public static readonly DependencyProperty InnerBorderIgnoreProperty =
DependencyProperty.RegisterAttached("InnerBorderIgnore", typeof(string),
- typeof(Grid), new PropertyMetadata("None", OnInnerBorderChanged));
+ typeof(GridHelper), new PropertyMetadata("None", OnInnerBorderChanged));
private static void OnInnerBorderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
--
Gitblit v1.9.1