Hi,
I have a userControl like this:
<UserControl x:Class="LoginModule.LoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:UserControls;assembly=UserControls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<UserControl.Resources>
<ResourceDictionary Source="pack://application:,,,/UserControls;component/Styles.xaml" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="30" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label Grid.Row="1" Grid.Column="0" Name="labelLogin" VerticalAlignment="Center">Login:</Label>
<Label Grid.Row="2" Grid.Column="0" Name="labelPassword" VerticalAlignment="Center">Password:</Label>
<TextBox Grid.Row="1" Grid.Column="1" Name="textboxLogin" VerticalAlignment="Center"></TextBox>
<TextBox Grid.Row="2" Grid.Column="1" Name="textboxPassword" VerticalAlignment="Center"></TextBox>
<Button Grid.Row="3" Grid.ColumnSpan="2" Template="{StaticResource SilverButton}" Height="25" Width="200" Name="buttonLogin" Content="Log In" Click="buttonLogin_Click" />
</Grid>
</UserControl>
In designer mode everything is ok (style works), all solution building with success. But when I run program with debug I get XamlParserException in:
<ResourceDictionary Source="pack://application:,,,/UserControls;component/Styles.xaml" />
with message like: Could not load UserControl oir one of his elements. Could not load file. I have reference to UserControl.dll I don't know what's going on.
Thanks for any fast help. Kamilos