009_DI-Elec/newFront/c#前端/SWS.CAD/Models/NoEntity/ContextOperationModel.cs

27 lines
815 B
C#
Raw Normal View History

2025-08-15 16:34:31 +08:00
using Prism.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SWS.CAD.Models.NoEntity
{
public class ContextOperationModel
{
public string Header { get; set; }
public string IconGlyph { get; set; }
/// <summary>
/// 大概率会直接在xaml里绑定command。如Setter Property="Command" Value="{Binding Command}"。
/// 带了一个object参数可以xaml里再绑定一个CommandParameter进去。
/// </summary>
public DelegateCommand<object> Command { get; set; }
public ContextOperationModel(string header, DelegateCommand<object> delegateCommand)
{
Header = header;
Command = delegateCommand;
}
}
}