Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Why are we getting a "'The property 'Resources' can only be set once"?

$
0
0

We've got a solution with 2 projects in it, in C#. Using VS 2012. In the secondary project we've got a Generic.xaml file which has some templates defined in it, for transitions, etc. In order to reference it we have put it into a resource dictionary in the primary project. Here's the App.xaml code:

<Application x:Class="BasicNavShell.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:BasicNavShell"
             StartupUri="NavShell.xaml"><Application.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="/NavShellControls;component/Themes/Generic.xaml" /></ResourceDictionary.MergedDictionaries></ResourceDictionary></Application.Resources></Application>

We've noticed there's a little squilley (tilda) underneath the opening bracket of the Application tag. Passing the mouse over that reviews the following:

"The property 'Resources' can only be set once."

Well, from our point of view, it looks like it is being set only once. We don't understand what's going on, nor why.


Rod


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>