Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot create an instance of "[user control]" error in designer
    text
    copied!<p>I have created the following user control. When I add it to a xaml window, I get the error "Cannot create an instance of "ucAppItem". I dragged the user control onto the window from the toolbar.</p> <p>XAML of user control is as follows:</p> <pre><code>&lt;UserControl x:Class="Demos.ucAppItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" Width="852" Height="215"&gt; &lt;Grid&gt; &lt;Label Name="lblTitle" Content="Title" HorizontalAlignment="Left" Margin="233,10,0,0" VerticalAlignment="Top" FontSize="22" FontFamily="Arial"/&gt; &lt;Image Width="40" Height="40" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,80,0"&gt; &lt;Image.Style&gt; &lt;Style TargetType="{x:Type Image}"&gt; &lt;Setter Property="Source" Value="pack://siteoforigin:,,,/arrow2.png"/&gt; &lt;Style.Triggers&gt; &lt;Trigger Property="IsMouseOver" Value="True"&gt; &lt;Setter Property="Source" Value="pack://siteoforigin:,,,/arrow1.png"/&gt; &lt;/Trigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/Image.Style&gt; &lt;/Image&gt; &lt;Label x:Name="lblRun" Content="Run" HorizontalAlignment="Right" Margin="0,88,35,0" VerticalAlignment="Top" Foreground="#FF2EAADC" FontSize="20"&gt; &lt;Label.Style&gt; &lt;Style TargetType="{x:Type Label}"&gt; &lt;Setter Property="Foreground" Value="#FF2EAADC"/&gt; &lt;Style.Triggers&gt; &lt;Trigger Property="IsMouseOver" Value="True"&gt; &lt;Setter Property="Foreground" Value="#006d9e"/&gt; &lt;/Trigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/Label.Style&gt; &lt;/Label&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>XAML of window is as follows:</p> <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Demos" x:Class="Demos.Window1" Title="Window1" Height="487" Width="854"&gt; &lt;Grid&gt; &lt;local:ucAppItem/&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p>Thanks for your help in advance!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload