Problems adding an ObjectDataProvider in resources
-
29-10-2019 - |
题
I'm setting up some things in XAML, but for some reason, I'm having an issue. I'm trying to add an ObjectDataProvider to my resources, but when I'm doing that, I get this warning on my resourcedictionnary saying i cannot have multiple items in a resourcedictionnary if they don't all have key attribute in it. So I add a key to resourcedictionnary, but then I have a problem on my dynamic resource in my contentcontrol. It says it cannot resolve "DefaultEmptyPane". Then I add a reference to the key of the resourcedictionnary, but then there's some kinda of mismatch.
Is there anyone who's seeing the issue here? Below is the XAML:
<Page.Resources>
<!--<ObjectDataProvider x:Key="projectList" MethodName=""/>-->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Resources/Panes/DefaultEmptyPane.xaml" />
</ResourceDictionary.MergedDictionaries>
<local:PopulationNameGetNameOnlyConverter x:Key="PopulationNameGetNameOnlyConverter"/>
<local:PopulationNameGetNumberOfTestsConverter x:Key="PopulationNameGetNumberOfTestsConverter"/>
<local:PopulationNameGetDateConverter x:Key="PopulationNameGetDateConverter"/>
<local:NormValidationValueToVisibilityConverter x:Key="NormValidationValueToVisibilityConverter"/>
<local:NormrequestCalculatedToVisibilityConverter x:Key="NormrequestCalculatedToVisibilityConverter"/>
<local:RemoveUnderscoreConverter x:Key="RemoveUnderscoreConverter"/>
</ResourceDictionary>
</Page.Resources>
<ContentControl Template="{DynamicResource DefaultEmptyPane}">
<!--Content-->
</ContentControl>
没有正确的解决方案
不隶属于 StackOverflow