Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think you'll need to use a "DesignTime" DataContext. Add the following to your <code>UserControl</code> Xaml file</p> <pre><code>xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:YourNamespace" mc:Ignorable="d" </code></pre> <p>And then set the DesignTime DataContext with</p> <pre><code>d:DataContext="{d:DesignInstance local:SimpleTextUserControl, IsDesignTimeCreatable=True}" </code></pre> <p>And remove ElementName from the Bindings</p> <pre><code>&lt;UserControl x:Class="YourNamespace.SimpleTextUserControl" 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" xmlns:local="clr-namespace:YourNamespace" mc:Ignorable="d" x:Name="root" d:DataContext="{d:DesignInstance local:SimpleTextUserControl, IsDesignTimeCreatable=True}"&gt; &lt;StackPanel Background="Blue"&gt; &lt;TextBlock x:Name="TitleTextBlock" Text="{Binding Path=Title}" Background="White" Width="200" Height="30" Margin="5" /&gt; &lt;TextBlock Text="{Binding Path=Time}" Background="White" Width="200" Height="30" Margin="9" /&gt; &lt;/StackPanel&gt; &lt;/UserControl&gt; </code></pre> <p>If you're still having problems getting this to work I uploaded a small sample project which you can compare to: <a href="http://www.mediafire.com/?gan28oeel4qf7ik" rel="nofollow">http://www.mediafire.com/?gan28oeel4qf7ik</a></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