~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to test/xaml/assorted/clipping-updates.html

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
7
 
 
8
<script type="text/javascript">
 
9
function OnMouseEnter (sender, eventArgs)
 
10
{
 
11
        sender.findName ("LowerLeft").point = "0,125";
 
12
        sender.findName ("LowerRight").point = "100,125";
 
13
        sender.findName ("UpperRight").point = "100,0";
 
14
}
 
15
function OnMouseLeave (sender, eventArgs)
 
16
{
 
17
        sender.findName ("LowerLeft").point = "0,10";
 
18
        sender.findName ("LowerRight").point = "10,10";
 
19
        sender.findName ("UpperRight").point = "10,0";
 
20
}
 
21
 
 
22
</script>
 
23
 
 
24
<object type="application/x-silverlight" data="data:," id="slControl" width="100" height="125">
 
25
<param name="background" value="#FFFFFF"/>
 
26
<param name="source" value="#xamlContent"/>
 
27
</object>
 
28
 
 
29
<script type="text/xaml" id="xamlContent">
 
30
<?xml version="1.0"?>
 
31
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
32
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
33
        MouseEnter="OnMouseEnter" MouseLeave="OnMouseLeave">
 
34
 
 
35
  <Canvas>
 
36
    <Canvas.Clip>
 
37
      <PathGeometry>
 
38
        <PathFigure>
 
39
          <LineSegment Point="0,0"/>
 
40
          <LineSegment x:Name="LowerLeft" Point="0,10"/>
 
41
          <LineSegment x:Name="LowerRight" Point="10,10"/>
 
42
          <LineSegment x:Name="UpperRight" Point="10,0"/>
 
43
          <LineSegment Point="0,0"/>
 
44
        </PathFigure>
 
45
      </PathGeometry>
 
46
    </Canvas.Clip>
 
47
    <Image Width="100" Height="125" Source="moonlight_logo.png"/>
 
48
  </Canvas>
 
49
 
 
50
</Canvas>
 
51
</script>
 
52
 
 
53
</body>
 
54
</html>