Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions UI/Templating/Core/TemplateBinding.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
namespace InkkSlinger;

public sealed class TemplateBinding
{
public TemplateBinding(string targetName, DependencyProperty targetProperty, DependencyProperty sourceProperty)
Expand All @@ -12,7 +10,7 @@ public TemplateBinding(
DependencyProperty targetProperty,
DependencyProperty sourceProperty,
object? fallbackValue,
object? targetNullValue)
object? targetNullValue = null)
{
TargetName = targetName;
TargetProperty = targetProperty;
Expand All @@ -30,4 +28,10 @@ public TemplateBinding(
public object? FallbackValue { get; }

public object? TargetNullValue { get; }
}

public void UpdateSource(string sourceName, DependencyProperty sourceProperty)
{
SourceProperty = sourceProperty;
// Trigger re-binding if necessary (implementation left out)
}
}