문제

My resource merged in App.xaml. but in design mode not found

in Run time it found and work correctly

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="Assets/Styles/Main.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

Style="{StaticResource pnlRibbon}" the resource "pnlRibbon" could not be resolved in design time

도움이 되었습니까?

해결책 2

it been solved with add this code to the .csproj file

   <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>

다른 팁

Use this syntax:

<ResourceDictionary Source="projectName;component/Assets/Styles/Main.xaml" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top