mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-08 10:16:36 +08:00
项目结构调整
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace LiveCharts.Uwp.Components.MultiBinding
|
||||
{
|
||||
/// <summary>
|
||||
/// A multiple binding item.
|
||||
/// </summary>
|
||||
public class MultiBindingItem : DependencyObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the binding value.
|
||||
/// </summary>
|
||||
/// <value>The binding value.</value>
|
||||
public object Value
|
||||
{
|
||||
get { return GetValue(ValueProperty); }
|
||||
set { SetValue(ValueProperty, value); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifier for the <see cref="Value" /> dependency property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ValueProperty =
|
||||
DependencyProperty.Register(nameof(Value), typeof(object), typeof(MultiBindingItem), new PropertyMetadata(null, OnValueChanged));
|
||||
|
||||
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var multiBindingItem = (MultiBindingItem)d;
|
||||
|
||||
multiBindingItem.Update();
|
||||
}
|
||||
|
||||
internal MultiBindingItemCollection Parent { get; set; }
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var parent = Parent;
|
||||
|
||||
parent?.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user