009_DI-Elec/newFront/c#前端/SWS.CAD/Models/NoEntity/ContextOperationModel.cs
2025-08-15 16:34:31 +08:00

27 lines
815 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}