I’m trying to create a custom control for a silverlight app that will basically allow the user to click and drag on a canvas and draw a line with a small rectangle at each end. How can I encapsulate these three controls into one custom control. I want to do something like this…
<UserControl x:Class="Linecontrol"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SomeAbstractGroupingContainer>
<Line Name="ctlLine" />
<Rectangle Name="rec1" />
<Rectangle Name="rec2" />
</SomeAbstractGroupingContainer>
</UserControl>
Any idea what I could use for SomeAbstractGroupingContainer?
How about Canvas?