UserControl as Node

Is it possible to use user controls as node content in Silverlight?

I dont see any samples about this scenario in your demo.
Cuold you please provide one?
Are there any limitations?

Yes you can. No, there aren’t any limitations.

I used Expression Blend to create:


<Grid x:Name="LayoutRoot">
    <Canvas Margin="0">
        <Rectangle Stroke="Black" Height="59" Width="70">
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF005322" Offset="1"/>
                    <GradientStop Color="#FF00C350"/>
        <Ellipse Stroke="Black" Height="63" Width="80" Canvas.Left="20" Canvas.Top="37">
                    <GradientStop Color="#FF0848F4" Offset="1"/>
                    <GradientStop Color="#FF7E9AE4"/>
        <TextBlock Canvas.Left="70" Text="{Binding Data.Key}" TextWrapping="Wrap"
            Width="30" FontStyle="Italic" FontWeight="Bold"
            HorizontalAlignment="Center" VerticalAlignment="Center"
            Height="37" TextAlignment="Center" FontSize="12"/>

I didn’t add anything to the code-behind.

Then for my Diagram:

<DataTemplate x:Key="UserControl1Template"> <local:UserControl1 Width="100" Height="100" /> </DataTemplate>

<go:Diagram x:Name="myDiagram" Padding="10" NodeTemplate="{StaticResource UserControl1Template}" />
results in something like:

Thank you!

You’re welcome.

I was editing my post at the same time you replied, so it may be a bit more complete now.