wpf 加载资源html,从资源文件加载WPF样式
我試圖從
WPF自定義控件庫(kù)實(shí)際上從其他文件加載WPF樣式
但我沒有加載這里是我的解決方案.
該解決方案包含兩個(gè)項(xiàng)目
>類型WPF自定義控件庫(kù)的WpfTestControls
> WPF應(yīng)用程序庫(kù)類型的WpfTestApp,它引用了WpfTestControls
來(lái)自WPF應(yīng)用程序庫(kù)的MainWindow.xaml
來(lái)自WPF自定義控件庫(kù)的Generic.xaml
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
來(lái)自WPF自定義控件庫(kù)的TextBoxStyle.xaml
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
我的AssemblyInfo.cs文件包含以下內(nèi)容
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries))]
但我仍然沒有加載風(fēng)格.
如果我使用不使用Generic.xaml一切正常,例如下面的代碼按預(yù)期工作
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
我究竟做錯(cuò)了什么 ?
提前致謝
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的wpf 加载资源html,从资源文件加载WPF样式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 自动添加html结束标志,XHTML标签
- 下一篇: html获取xml分页,JavaScri