1 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
3 <title>Clipping Update test
</title>
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 ();
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"/>
34 <script type=
"text/xaml" id=
"xamlContent">
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">
41 <SolidColorBrush x:
Name=
"testerBackground" Color=
"Blue" />
45 <TextBlock Canvas.
Left=
"10" Canvas.
Top=
"100" Width=
"70" x:
Name=
"text">
54 <TextBlock.Foreground
>
55 <SolidColorBrush Color=
"Red"/>
56 </TextBlock.Foreground
>
59 <Rectangle Stroke=
"Orange" Canvas.
Left=
"10" Canvas.
Top=
"100" x:
Name=
"actualrect"/>
62 <Storyboard x:
Name=
"active">
63 <ColorAnimation Storyboard.
TargetName=
"testerBackground" Storyboard.
TargetProperty=
"Color" To=
"Red" />
65 <Storyboard x:
Name=
"inactive">
66 <ColorAnimation Storyboard.
TargetName=
"testerBackground" Storyboard.
TargetProperty=
"Color" To=
"Blue" />