Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Path element
2 replies. Latest Post by CraigN on March 10, 2008.
(0)
redjackl
Member
69 points
70 Posts
03-10-2008 1:54 AM |
Is there a Path Element in New silverlight release ?
Does Xaml.Load () method works as same before?
Regards,
mchlsync
Star
14606 points
2,730 Posts
03-10-2008 3:32 AM |
redjackl:Is there a Path Element in New silverlight release ?
Path is still there in SL2.
Example: <Path Height="109.577" HorizontalAlignment="Left" Margin="183.5,102.5,0,0" VerticalAlignment="Top" Width="124.215" Data="M251,103 C372,226 260,211 260,211 C260,211 213.00029,210.99969 184.00052,168.99982" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FF000000" d:LayoutOverrides="Height"/>
redjackl:Does Xaml.Load () method works as same before?
XamlReader.Load()?
XamlReader.Load() Requires xmlns
In order to play by XML rules, XamlReader.Load() now requires you to specify an xmlns inside your XAML file.
Before
XamlReader.Load(“<Canvas/>”);
Now
XamlReader.Load("<Canvas xmlns="http://schemas.microsoft.com/client/2007"/>");
Hope it helps.
CraigN
352 points
89 Posts
03-10-2008 4:37 AM |
Yeah there is a Path element, System.Windows.Shapes.Path.
XamlReader.Load() has changed slightly as it now requires all XAML fragments to be properly namespaced. That means you need to make sure the correct xmlns declarations are present in the fragment.