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

static resource cannot be resolved

$
0
0

I have joined to the team when previous developmer has left. 

I have put attention when I have looked at the XAML file that there are many resources from the Application Resources are not resolved by the Visual Studio. 

For instant, I have button style is located in one of the files

<Application.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="pack://application:,,,/SomeCompany.SomeStyles;component/CustomStyle/Button.xaml" /></ResourceDictionary.MergedDictionaries></ResourceDictionary></Application.Resources>
<Button Content="{x:Static t:Language.Action_Ok}" Command="{Binding OkCommand}" Style="{StaticResource PrimaryButton}" AutomationProperties.AutomationId="{x:Static automation:AutomationIds.OkButton}"/>

When code is run everything is working. So, I assume it does peak the correct resource.

The question is why Static Resource is not resolved.

Is it by design when you have application resource? 

Or is it done on purpose because of the MVVM concept? (The reason for this question that I have put attention that binding properties is not resolved as well)

Or another reason?




Viewing all articles
Browse latest Browse all 18858

Trending Articles



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