private static StyleUpdateInfo GetNewStyleUpdateInfo(IDomElement <TDependencyObject> domElement, IDependencyPropertyService <TDependencyObject, TStyle, TDependencyProperty> dependencyPropertyService, INativeStyleService <TStyle, TDependencyObject, TDependencyProperty> nativeStyleService) { if (dependencyPropertyService.GetInitialStyle(domElement.Element) == null) { dependencyPropertyService.SetInitialStyle(domElement.Element, nativeStyleService.GetStyle(domElement.Element)); } return(new StyleUpdateInfo { MatchedType = domElement.Element.GetType() }); }