* MoonlightTypeConverter.cs: Convert CacheMode's from strings.
[moon.git] / test / xaml / test-textblock-hittest.html
blobe2738e0a8e98591fa53d721e280903073af55d48
1 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
2 <head>
3 <title>Clipping Update test</title>
4 <meta></meta>
5 </head>
6 <body>
8 <script type="text/javascript">
9 function onRootLoaded (sender, eventArgs)
11 var actualrect = sender.findName ("actualrect");
12 var text = sender.findName ("text");
13 actualrect.width = text.actualWidth;
14 actualrect.height = text.actualHeight;
17 function onTesterEnter (sender, eventArgs)
19 sender.findName ("active").begin ();
22 function onTesterLeave (sender, eventArgs)
24 sender.findName ("inactive").begin ();
27 </script>
29 <object type="application/x-silverlight" data="data:," id="slControl" width="500" height="500">
30 <param name="background" value="#FFFFFF"/>
31 <param name="source" value="#xamlContent"/>
32 </object>
34 <script type="text/xaml" id="xamlContent">
35 <?xml version="1.0"?>
36 <Canvas xmlns="http://schemas.microsoft.com/client/2007"
37 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
38 x:Name="root" Loaded="onRootLoaded">
39 <Canvas x:Name="tester" Canvas.Left="10" Canvas.Top="120" Width="80" Height="20" MouseEnter="onTesterEnter" MouseLeave="onTesterLeave">
40 <Canvas.Background>
41 <SolidColorBrush x:Name="testerBackground" Color="Blue" />
42 </Canvas.Background>
43 </Canvas>
45 <TextBlock Canvas.Left="10" Canvas.Top="100" Width="70" x:Name="text">
46 <TextBlock.Inlines>
47 <Run Text="Line 1"/>
48 <LineBreak/>
49 <LineBreak/>
50 <Run Text="Line 2"/>
51 <LineBreak/>
52 </TextBlock.Inlines>
54 <TextBlock.Foreground>
55 <SolidColorBrush Color="Red"/>
56 </TextBlock.Foreground>
57 </TextBlock>
59 <Rectangle Stroke="Orange" Canvas.Left="10" Canvas.Top="100" x:Name="actualrect"/>
61 <Canvas.Resources>
62 <Storyboard x:Name="active">
63 <ColorAnimation Storyboard.TargetName="testerBackground" Storyboard.TargetProperty="Color" To="Red" />
64 </Storyboard>
65 <Storyboard x:Name="inactive">
66 <ColorAnimation Storyboard.TargetName="testerBackground" Storyboard.TargetProperty="Color" To="Blue" />
67 </Storyboard>
68 </Canvas.Resources>
69 </Canvas>
70 </script>
72 </body>
73 </html>