I am reading Silverlight 2 Unleashed, published in October 2008, and it has examples with a canvas tag:
<Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Red" Width="500" Height="300"> <Ellipse Width="400"...
However, when I create a new Silverlight application in VS2008, I get the UserControl root tag:
<UserControl x:Class="TestFirst.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"> <Grid x:Name="LayoutRoot" Background="White"...
Of course, I can change this by replacing the root Canvas tag, but then I need to also change the code behind to inherit Canvas instead of UserControl and take out the InitializeComponent method.
Canvas XAML . , XAML - SilverlightPad. , XAML, ( ).
, XAML XAML. Visual Studio , XAML UserControl UserControl , . , , , -. , , , XAML - , "" .
Silverlight 2 Unleashed , ( ) . , , Visual Studio , . , , , , .
, .
Cheers, Laurent
, , , - . , , , .
, UserControl . - , Canvas UserControl. [Edit:] Grid Canvas - , Canvas!
- ; - , . , Grids, DockPanels / StackPanels. , , .:)
, . Canvas -, , .