具备界面基础功能

This commit is contained in:
2026-01-01 22:40:32 +08:00
parent 0c86b4dad3
commit d039559402
81 changed files with 8333 additions and 1905 deletions

View File

@@ -0,0 +1,29 @@
using System.Globalization;
using System.Windows.Data;
namespace SHH.CameraDashboard;
/// <summary>
/// 布尔值转最大缩放比例转换器
/// </summary>
public class BoolToMaxScaleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// 如果 AllowExpand (value) 为 true
if (value is bool allow && allow)
{
// 允许放大:最大支持 200% (即放大 2 倍)
// 你也可以改成 300 或根据业务需求调整
return 200.0;
}
// 不允许放大:最大限制在 100% (原图大小)
return 100.0;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}