Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't use InkCanvas in SilverLight
    text
    copied!<p>I am trying to create my first program in SilverLight. But I can't use the InkCanvas.</p> <p>Simply, I just:</p> <ol> <li>Create a new project.</li> <li>Choose SilverLight Application (Framework 4.5)</li> <li>UnCheck "Host the silverlight application in a website..."</li> <li>SilverLight version 5</li> <li>"WCF RIA Services" unchecked</li> <li>Click on ToolBox > Choose Items > Select InkCanvas from SilverLight components</li> <li>Add InkCanvas to the form &amp; Change it's background color to black</li> <li>Click on "Start" (Debug)</li> </ol> <p>But I can't see or use the Canvas.</p> <p>Here is the XAML:</p> <pre><code>&lt;UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Workspace="clr-namespace:Microsoft.Expression.Prototyping.Workspace;assembly=Microsoft.Expression.Prototyping.Runtime" x:Class="SilverlightApplication3.MainPage" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"&gt; &lt;Grid x:Name="LayoutRoot" Background="White"&gt; &lt;Workspace:InkCanvas HorizontalAlignment="Left" Height="204" Margin="36,52,0,0" VerticalAlignment="Top" Width="310" Background="Black" /&gt; &lt;/Grid&gt; &lt;/UserControl&gt; </code></pre> <p>Then I get these 2 errors:</p> <blockquote> <p>Error 1 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Microsoft.Expression.Prototyping.Workspace' that could not be found. c:\users\xperator\documents\visual studio 2012\Projects\SilverlightApplication3\SilverlightApplication3\MainPage.xaml 6 21 SilverlightApplication3</p> </blockquote> <p>and</p> <blockquote> <p>Error 2 The type 'Workspace:InkCanvas' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. c:\users\xperator\documents\visual studio 2012\Projects\SilverlightApplication3\SilverlightApplication3\MainPage.xaml 12 10 SilverlightApplication3</p> </blockquote> <p>As the error says, there is no <code>Workspace</code> in the Prototyping namespace. I can see in the Solution explorer, there is only 2 References related to the InkCanvas:</p> <blockquote> <p>Microsoft.Expression.Prototyping.Interactivity</p> <p>microsoft.expression.prototyping.runtime</p> </blockquote> <p>Tried to add the "Workspace" from the "Add Reference" but couldn't find it.</p> <p>UPDATE :</p> <p>I think actually the InkCanvas is not official ported to silverlight yet. Tried to do the same steps on a fresh pc, and I just noticed InkCanvas wasn't there in the first place. Maybe something related to Blend added the prototype control in my own PC. Still it doesn't work :(</p> <p>I am open to any suggestion for alternatives to InkCanvas.</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