Domanda

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

È stato utile?

Soluzione 2

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

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

Altri suggerimenti

Use this syntax:

<ResourceDictionary Source="projectName;component/Assets/Styles/Main.xaml" />
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top