I'm trying to add multiple languages to my WPF program. So I use Properties.Resources to store all visible strings.
In my XAML I have
<Window x:Class="DCMarker.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:loc="clr-namespace:DCMarker.Properties"
Title="{x:Static loc:Resources.Title}" Height="534.6" Width="612" Loaded="Window_Loaded" Closed="Window_Closed"
>
<Grid>
<Menu Height="26" VerticalAlignment="Top">
<MenuItem Header="{x:Static loc:Resources.Tools}">
<MenuItem x:Name="ToolsConnect" Header="{x:Static loc:Resources.ToolsConnect}" Click="ToolsConnect_Click" />
<MenuItem x:Name="ToolsDisconnect" Header="{x:Static loc:Resources.ToolsDisconnect}" Click="ToolsDisconnect_Click" />
<Separator HorizontalAlignment="Left" />
<MenuItem x:Name="ToolsOptions" Header="{x:Static loc:Resources.ToolsOptions}" Click="ToolsOptions_Click" />
</MenuItem>
But If I add a string to Resources this string will not be recognized by the XAML editor (or maybe Intellisence). Usually if I rebuild the solution they will be recognized but sometimes i have to restart VS2013.
Anyone have a clue why and how to fix this?
// anders