This is probably stupid (and old news now), but if you saw the xaml demo during the PDC of Avalon (presented by Don Box I think), here is the code to reproduce that sample. Please note that you would need to change the source tag in the Video class to a path that makes more sense for you.

Also, as always, please use common sense when running this. Don’t flame me if something blows up. :)

window1.xaml:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<Window   
    xmlns="[http://schemas.microsoft.com/2003/xaml](http://schemas.microsoft.com/2003/xaml)"  
    xmlns:def="Definition"  
    def:Class="LonghornApp1.Window1"  
    def:CodeBehind="Window1.xaml.cs"  
    Text="Amit's First Longhorn App" Visible="True"  
    >  
    <!--  The namespace + class name in the codebehind file and the def:Class attribute in the root of this document, must stay identical.  You can change them, but you must keep them in sync. -->  
        <Canvas DockPanel.Dock="Fill">  
    <Video Width="100%" Height="100%" Stretch="Fill" Source="c:\\temp\\ChrisA-DonB\_300K.wmv" />  
    <TransformDecorator Transform="rotate 30 scale 3 3" DockPanel.Dock="Fill">  
        <TextPanel>     
        <TextBox ID="foo" Width="2in" Height="20pt"></TextBox>  
        <Button Click="Pushed">Click Me</Button>  
        </TextPanel>  
        </TransformDecorator>      
    </Canvas>  
</Window> 

window1.xaml codebehind:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//This is a list of commonly used namespaces for a window.  
using System;
using MSAvalon.Windows;
using MSAvalon.Windows.Controls;
using MSAvalon.Windows.Documents;
using MSAvalon.Windows.Navigation;
using MSAvalon.Windows.Shapes;
using MSAvalon.Windows.Data;

namespace LonghornApp1 {
  ///
    
  /// Interaction logic for Window1.xaml///

  public partial class Window1 : Window {
    // To use Loaded event put Loaded="WindowLoaded" attribute in root element of .xaml file.  
    // private void WindowLoaded(object sender, EventArgs e) {}  
      
    void Pushed(object o, ClickEventArgs e)  
    {  
           MessageBox.Show(foo.Text);  
    }

  }
}