|
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local="clr-namespace:AcrobatViewerMvvm"
xmlns:behaviours="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
x:Class="AcrobatViewerMvvm.MainWindow"
Title="MVVM with Adobe Reader COM Object" Height="350" Width="525">
<Window.DataContext>
<local:MainWindowViewModel/>
</Window.DataContext>
<DockPanel>
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="3">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="3" />
</Style>
</StackPanel.Resources>
<Button Content="Print PDF">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<behaviours:CallMethodAction TargetObject="{Binding ElementName=PdfViewer}" MethodName="Print" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button Command="{Binding SwapPdfsCommand}" Content="Change PDF File"/>
</StackPanel>
<local:PdfViewerHost x:Name="PdfViewer" PdfPath="{Binding CurrentPdf}" />
</DockPanel>
</Window>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.