/Main/src/DynamicDataDisplay/Common/Auxiliary/MarkupExtensions/SelfBinding.cs
C# | 23 lines | 21 code | 2 blank | 0 comment | 0 complexity | 9bf7f2c7e13de278a7d7920f5464b11f MD5 | raw file
Possible License(s): CC-BY-SA-3.0
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5using System.Windows.Data; 6using System.Windows; 7 8namespace Microsoft.Research.DynamicDataDisplay.MarkupExtensions 9{ 10 public class SelfBinding : Binding 11 { 12 public SelfBinding() 13 { 14 RelativeSource = new RelativeSource { Mode = RelativeSourceMode.Self }; 15 } 16 17 public SelfBinding(string propertyPath) 18 : this() 19 { 20 Path = new PropertyPath(propertyPath); 21 } 22 } 23}