The following piece of code located in App.xaml defines a static application-wide resource, which I sucessfully binded to a listbox control.
<Application x:Class="cviko.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:cviko.Properties"
StartupUri="MainWindow.xaml">
<Application.Resources>
<CollectionViewSource x:Key="SStrings"
Source="{Binding Source={x:Static properties:Settings.Default}, Path=Strings}">
</CollectionViewSource>
</Application.Resources>
I, however, want to do the same, but instead use properties defined in another project. Something like this (not compilable):
<Application x:Class="cviko.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:cviko.Properties"
//NEW
xmlns:props="clr-namespace:UIComponents.Properties"
StartupUri="MainWindow.xaml">
<Application.Resources>
//MODIFIED
<CollectionViewSource x:Key="SStrings"
Source="{Binding Source={x:Static props:Settings.Default}, Path=Nums}">
</CollectionViewSource>
</Application.Resources>
Any advice is welcome, thanks.
Omg, I figured it out immediately after posting:
1) I needed to use this:
2) And most importantly: it was necessary to set settings to public, which I overlooked.