Frage

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

War es hilfreich?

Lösung 2

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

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

Andere Tipps

Use this syntax:

<ResourceDictionary Source="projectName;component/Assets/Styles/Main.xaml" />
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top