Loading

WPF 后台读取样式文件

ResourceDictionary dic = new ResourceDictionary { Source = new Uri("Styles.xaml",UriKind.Relative) };
Style style = (Style)dic["TextBlockStyle"];
ResourceDictionary dic0 = (ResourceDictionary)System.Windows.Application.LoadComponent(new Uri("Styles.xaml", UriKind.RelativeOrAbsolute));
Style style0 = (Style)dic0["TextBlockStyle"];

 

posted @ 2015-08-06 10:30  眾尋  阅读(1661)  评论(0编辑  收藏  举报