PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Data;
  6. using System.Windows;
  7. namespace Microsoft.Research.DynamicDataDisplay.MarkupExtensions
  8. {
  9. public class SelfBinding : Binding
  10. {
  11. public SelfBinding()
  12. {
  13. RelativeSource = new RelativeSource { Mode = RelativeSourceMode.Self };
  14. }
  15. public SelfBinding(string propertyPath)
  16. : this()
  17. {
  18. Path = new PropertyPath(propertyPath);
  19. }
  20. }
  21. }