Silverlight 4 COM interop feature demo (VBSL4COMInterop)

This project demonstrates how to inter-operate with COM components in Silverlight 4.

VB.NET (49.8 KB)
 
 
 
 
 
5 Star
(1)
9,411 times
Add to favorites
5/5/2011
E-mail Twitter del.icio.us Digg Facebook
<UserControl x:Class="VBSL4COMInterop.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Height="300" Width="400"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <Button Content="Export data to Notepad" Click="TextExport_Click"/>
            <Button Content="Export data to Word" Click="WordExport_Click">
                <Button.ContentTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding}"/>
                            <TextBlock Text=" ("/>
                            <CheckBox IsTabStop="False"
                                      Checked="CheckBox_StateChanged"
                                      Unchecked="CheckBox_StateChanged"
                                      Content="Print directly with default printer"/>
                            <TextBlock Text=")"/>
                        </StackPanel>
                    </DataTemplate>
                </Button.ContentTemplate>
            </Button>
        </StackPanel>
        <sdk:DataGrid Grid.Row="1" Name="dataGrid1" AutoGenerateColumns="True"/>
    </Grid>
</UserControl>