Question

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

Était-ce utile?

La solution 2

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

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

Autres conseils

Use this syntax:

<ResourceDictionary Source="projectName;component/Assets/Styles/Main.xaml" />
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top