日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > asp.net >内容正文

asp.net

wpf 加载资源html,从资源文件加载WPF样式

發(fā)布時(shí)間:2025/3/20 asp.net 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 wpf 加载资源html,从资源文件加载WPF样式 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

我試圖從

WPF自定義控件庫(kù)實(shí)際上從其他文件加載WPF樣式

但我沒(méi)有加載這里是我的解決方案.

該解決方案包含兩個(gè)項(xiàng)目

>類(lèi)型WPF自定義控件庫(kù)的WpfTestControls

> WPF應(yīng)用程序庫(kù)類(lèi)型的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))]

但我仍然沒(méi)有加載風(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ù)專(zhuān)家共同創(chuàng)作,文字、視頻、音頻交互閱讀

總結(jié)

以上是生活随笔為你收集整理的wpf 加载资源html,从资源文件加载WPF样式的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。