ntwain/Tests/Tester.WPF/MainWindow.xaml
2014-04-20 22:24:05 -04:00

70 lines
3.3 KiB
XML

<Window x:Class="Tester.WPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:modern="http://modernwpf"
Title="TWAIN DS Tester" Height="600" Width="900" ResizeMode="CanResizeWithGrip"
modern:Chrome.ShowCaptionIcon="False"
Style="{StaticResource AppWindow}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Content="Sources"></Label>
<ListBox x:Name="SrcList" Grid.Row="1" Width="150"
SelectionChanged="SrcList_SelectionChanged"
Style="{StaticResource AppListBox}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" TextWrapping="Wrap"></TextBlock>
<TextBlock Text="{Binding Version, StringFormat='Version {0}'}" TextWrapping="Wrap" Foreground="{DynamicResource ModernForeground2}"
Margin="8 0 0 0"/>
<TextBlock Text="{Binding Protocol, StringFormat='TWAIN {0}'}" Foreground="{DynamicResource ModernForeground2}"
Margin="8 0 0 0"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Label Content="Caps" Grid.Column="1"></Label>
<ListBox x:Name="CapList" Grid.Row="1" Grid.Column="1" Width="150"
SelectionChanged="CapList_SelectionChanged"
Style="{StaticResource AppListBox}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" ></TextBlock>
<TextBlock Text="{Binding Supports}" TextWrapping="Wrap" Foreground="{DynamicResource ModernForeground2}"
FontStyle="Italic"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate></ListBox>
<Label Content="Cap values" Grid.Column="2"></Label>
<ListBox x:Name="CapDetailList" Grid.Row="1" Grid.Column="2" MinWidth="100"
SelectionChanged="CapDetailList_SelectionChanged"
ScrollViewer.CanContentScroll="True"
Style="{StaticResource AppListBox}"></ListBox>
<StackPanel Orientation="Horizontal" Grid.Column="3" >
<Label Content="State:"></Label>
<TextBlock Text="{Binding State}"></TextBlock>
<Button Content="Test acquire" Click="Button_Click_1" Margin="4 0"></Button>
</StackPanel>
<modern:AnimatedScrollViewer Grid.Row="1" Grid.Column="3" VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto">
<Image Stretch="Uniform" MaxWidth="1000"
RenderOptions.BitmapScalingMode="HighQuality"
Source="{Binding Image}"></Image>
</modern:AnimatedScrollViewer>
</Grid>
</Window>