Created
November 30, 2011 04:22
-
-
Save posaunehm/1408002 to your computer and use it in GitHub Desktop.
Extension method that helps updating binding target.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Data; | |
using System.Windows.Controls; | |
using System.Windows; | |
namespace Infrastructure.Extensions | |
{ | |
public static class ControlBindingHelper | |
{ | |
public static void UpdateBindingTarget(this DependencyObject ctrl, params DependencyProperty[] args) | |
{ | |
foreach (var dp in args) | |
{ | |
BindingOperations.GetBindingExpression(ctrl, dp).UpdateTarget(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment