12345678910111213141516171819202122232425262728 |
- using Microsoft.Xaml.Behaviors;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- namespace PDF_Office.Helper
- {
- public class SetterAction : TriggerAction<DependencyObject>
- {
- public SetterAction()
- {
- Setters = new List<Setter>();
- }
- public List<Setter> Setters { get; set; }
- protected override void Invoke(object parameter)
- {
- foreach (var item in Setters)
- {
- AssociatedObject.SetValue(item.Property, item.Value);
- }
- }
- }
- }
|