gpt4 book ai didi

c# - 无法访问Strings.resx?

转载 作者:行者123 更新时间:2023-12-03 10:37:19 27 4
gpt4 key购买 nike

   <Window x:Class="AFICController.View.WizardDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:view="clr-namespace AFICController.View"
xmlns:res="clr-namespace AFICController.Resources"
Title="{x:Static res:Strings.WizardWelcomeWindow_Title}"
ShowInTaskbar="True"
Width="800"
Height="600"
WindowStartupLocation="CenterScreen"
WindowStyle="SingleBorderWindow"
BorderBrush="#003B7B"
BorderThickness="0"
ResizeMode="CanResize"
Icon="/AFICController;component/Resources/Images/att_icon.ico"
>

<view:WizardView Loaded="WizardView_Loaded_1"/>

</Window>

我想从WPF窗口访问我的Strings.resx文件,但它给了我以下错误:

"Strings" does not exist in the namespace "clr-namespace AFICController.Resources".
C:\Users\systellex\Dropbox\Projects\AFICController\AFICController\View\WizardDialog.xaml
\AFICController



我知道问题出在 "Title="{x:Static res:Strings.WizardWelcomeWindow_Title}",但我不知道如何解决实际错误?谁能解释确切的问题在哪里?任何帮助将是非常可贵的?

最佳答案

这也适用于..

还将您的资源文件的访问修饰符更改为Public

Title="{Binding Source={x:Static res:Strings.WizardWelcomeWindow_Title}}"

关于c# - 无法访问Strings.resx?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21424885/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com