Still can't find resources in XAML
This only seems to happen in my main project. This used to work in the first couple of R#7 builds. It seems to work if I start up a random project and create a structure like this:
See how my working example is set up below.
ProjectName
|
|--Resources
| |--TextBlock.xaml (resourceDictionary)
| | ResourceKey: DefaultTextStyle
|--App.xaml
|--MainWindow.xaml
App.xaml:
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources/TextBlock.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
MainWindow.xaml
<Window x:Class="StressTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <Grid> <TextBlock Text="Something" Style="{StaticResource DefaultTextStyle}"/> </Grid> </Window>
I declare & reference resources in the same manner in my [much more complex] main project but it never picks up the resources, it simply says "Resource __ is not found". Is there some R# settings I can check?
Please sign in to leave a comment.
Hello
I wasn't able to reproduce this behavior with the latest R#7 nightly build. If this still happens for you with the latest build, could you please attach a small sample solution that demonstrates this behavior? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I tested this in R#7. There doesn't seem to be a problem with R# finding resources in app.xaml or in other projects in the same solution.
What doesn't work is when resources are referenced in external libraries.
See http://youtrack.jetbrains.com/issue/RSRP-279821.
Is this going to be fixed, it's fairly annoying.
Hello Philip
I've raised the priority of this issue and we'll do our best to fix this problem soon. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"