亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何修復“MaterialDesignFloatingHintTextBox”無法解析

如何修復“MaterialDesignFloatingHintTextBox”無法解析

PHP
DIEA 2024-01-20 21:13:23
我正在嘗試使用材料設計制作 UI,但是當我想使用它時出現錯誤:無法解析資源“MaterialDesignFloatingHintTextBox”。https://ibb.co/PcvdmqH錯誤看起來如何我從 NuGet MaterialDesignThemes 安裝,我導入了這個 xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"在 App.xaml 中我這樣寫:<ResourceDictionary x:Key="MaterialDesign">            <ResourceDictionary.MergedDictionaries>                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" />            </ResourceDictionary.MergedDictionaries>        </ResourceDictionary>我該如何修復它?
查看完整描述

3 回答

?
米脂

TA貢獻1836條經驗 獲得超3個贊

嘗試添加以下內容:

<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBox.xaml" />


查看完整回答
反對 回復 2024-01-20
?
桃花長相依

TA貢獻1860條經驗 獲得超8個贊

首先檢查您的項目資源,確保您擁有 Material Design 的核心資源。將此代碼添加到您的 App.Xaml 文件中;在應用程序.資源下。這個對我有用。 <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />



查看完整回答
反對 回復 2024-01-20
?
梵蒂岡之花

TA貢獻1900條經驗 獲得超5個贊

您需要將其放在您的 xaml 文件的頂部,您想要放置具有樣式materialdesignfloatinghint樣式的文本框

xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"


查看完整回答
反對 回復 2024-01-20
  • 3 回答
  • 0 關注
  • 238 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號