public static void SetForeground(this FrameworkElement element, WBinding binding) { if (element == null) { throw new ArgumentNullException("element"); } element.SetBinding(GetForegroundProperty(element), binding); }
public static object GetForegroundCache(this FrameworkElement element) { WBinding binding = GetForegroundBinding(element); if (binding != null) { return(binding); } return(GetForeground(element)); }