Is it possible to simply embed XAML tags in a webpage (just like how we embed HTML tags) and view it in browsers (which have silverlight installed and configured), without having to use any Microsoft.Net code or assembly or even javascript for that matter?
Yes it is definitely possible. Its by using inline XAML. Simply use the code below and you will be able to see the magic in your webbrowser. I am sure you can build upon it
<html><head></head> <body> <script type="text/xaml" id="xaml"> <?xml version="1.0"?> <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Rectangle Height="100" Width="280" Stroke="Maroon" Fill="Wheat" StrokeThickness="3" RadiusX="5" RadiusY="5"> </Rectangle> <TextBlock Canvas.Top="10" Canvas.Left="15" Text="Silverlight/XAML without Javascript" > <TextBlock.RenderTransform> <RotateTransform Angle="13" /> </TextBlock.RenderTransform> </TextBlock> </Canvas> </script> <object id="silverlightControl" type="application/x-silverlight" height="100" width="300"> <!-- Provide installation prompt image if Silverlight not found in the client system --> <param name="Source" value="#xaml"/> <a href="http://go2.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;"> <img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/> </a> </object> </body> </html>







No Comments Yet - be the First!