|
<!-- Silverlight Photo Annotation HTA Example -->
<!-- Gavin Gear, 06/2007 -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Photo Annotation HTA</title>
<script type="text/XAML" id="xaml1">
<Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Loaded="javascript:root_Loaded"
x:Name="root"
Width="800" Height="533"
Background="black">
<Image Source="lake.jpg"/>
<InkPresenter
x:Name="inkPresenterElement"
Background="transparent"
Width="800" Height="533"
MouseLeftButtonDown="javascript:InkPresenterMouseDown"
MouseMove="javascript:InkPresenterMouseMove"
MouseLeftButtonUp="javascript:InkPresenterMouseUp"/>
</Canvas>
</script>
<script type="text/javascript">
var silverlight;
var inkPresenter; // Corresponds to InkPresenter element in xaml
var newStroke = null; // The Stroke variable we’ll use here in mouse handlers
function root_Loaded(sender, args)
{
silverlight = sender.getHost();
inkPresenter = sender.findname("inkPresenterElement");
}
|