Is it possible to set "x:Class" more than one into a ResourceDictionary file?
<p>I have a <code>ResourceDictionary</code> file and also I have two classes to use for it.<br /> One of them is <code>IValueConverter</code> and the other is for the <code>EventHandlers</code> related to the control.<br /> The class name is <code>EventHandlers</code> set as <code>x:Class</code> attribute value.<br /> I also need to set <code>Converters</code> as a second <code>x:Class</code>.<br /> But I can't do it because the designer throws an error that says <code>x:Class is set more than one time</code>.<br /> How can I solve this issue?</p>

<p><strong>Converters.cs</strong></p>

<pre><code> class Converters : IValueConverter
{

    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        double pr = (double)value;
        AltoProgressBar bar = parameter as AltoProgressBar;
        return pr * bar.Width / bar.Maximum;

    }

    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
</code></pre>

<p><strong>EventHandlers.cs</strong></p>

<pre><code>public partial class EventHandlers 
{
    private void progressBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs&lt;double&gt; e)
    {
        ProgressBar progressBar = sender as ProgressBar;
        var template = progressBar.Template;

        //Find the Rectangle in the ControlTemplate
        var layer = (Rectangle)(template.FindName("rect", progressBar));

        //Calculate the increment amount depending maxValue and Width
        double artis = progressBar.Value * progressBar.Width / progressBar.Maximum;

        DoubleAnimation anim = new DoubleAnimation(toValue: artis, duration: TimeSpan.FromMilliseconds(100));

        layer.BeginAnimation(Rectangle.WidthProperty, anim);
    }
}
</code></pre>

<p><strong>styles.xaml</strong></p>

<pre><code>&lt;ResourceDictionary xmlns:my="clr-namespace:AltoSS"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                x:Class="AltoSS.Converters" 
                &lt;!--this doesn't make any sense--&gt;
                x:Class="AltoSS.EventHandlers"&gt;
&lt;!--All styles in here--&gt;
&lt;/ResourceDictionary&gt;
</code></pre>