public BaseSetter(DependencyObject[] target, PropertyInfo[] pi) { this.Focusable = false; this.Targets = target; this.TargetProperties = pi; if (this.TargetProperties != null) { this.TargetDependencyProperties = this.TargetProperties .Select(tp => ReflectionEx.GetDependencyProperty(tp)) .Where(dp => dp != null) .ToArray(); } if (this.TargetProperties == null || this.TargetDependencyProperties == null || this.TargetProperties.Length != this.TargetDependencyProperties.Length) { throw new ArgumentException("속성을 찾을 수 없습니다."); } this.PropertyType = this.TargetProperties[0].PropertyType; InitializeMultiBinding(); this.Loaded += BaseSetter_Loaded; this.Unloaded += BaseSetter_Unloaded; }
public BaseSetter(DependencyObject target, PropertyInfo pi) { this.Focusable = false; this.Target = target; TargetProperty = pi; if (TargetProperty != null) { TargetDependencyProperty = ReflectionEx.GetDependencyProperty(TargetProperty); } if (TargetProperty == null || TargetDependencyProperty == null) { throw new ArgumentException("속성을 찾을 수 없습니다."); } // Target Binding OnTargetPropertyBinding(); this.Loaded += BaseSetter_Loaded; this.Unloaded += BaseSetter_Unloaded; }