public static T Style <T>(this T element, Style style) where T : IFrameworkElement { #if NETFX_CORE style.ApplyTo(element); #else element.Style = style; #endif return(element); }