public static Style CreateStyle() { var style = TextBoxStyle.CreateTextBoxStyle(); style.TargetType = typeof(TextBoxEx); return(style); }