/
MainWindow.xaml
30 lines (30 loc) · 2 KB
/
MainWindow.xaml
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
26
27
28
29
30
<Window x:Class="PdfViewerCustomization.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/documentviewer"
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
Title="MainWindow"
Height="350"
Width="525">
<dxpdf:PdfViewerControl x:Name="viewer" CommandBarStyle="Ribbon">
<dxpdf:PdfViewerControl.CommandProvider>
<dxpdf:PdfCommandProvider>
<dxpdf:PdfCommandProvider.RibbonActions>
<dxb:UpdateAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Ribbon}" PropertyName="ToolbarShowMode" Value="Hide"/>
<dxb:RemoveAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.SaveAs}"/>
<dxb:ReplaceAction ElementName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.Close}">
<dxb:BarButtonItem Content="Exit" LargeGlyph="{dx:DXImageOffice2013 Image=Close_32x32.png}"
Command="{Binding ElementName=viewer, Path=CloseDocumentCommand}"/>
</dxb:ReplaceAction>
<dxb:InsertAction Index="1" ContainerName="{x:Static dxpdf:DefaultPdfBarManagerItemNames.FileRibbonGroup}">
<dxb:BarButtonItem Content="Save" LargeGlyph="{dx:DXImageOffice2013 Image=SaveAs_32x32.png}"
Command="{Binding ElementName=viewer, Path=SaveAsCommand}"/>
</dxb:InsertAction>
</dxpdf:PdfCommandProvider.RibbonActions>
</dxpdf:PdfCommandProvider>
</dxpdf:PdfViewerControl.CommandProvider>
</dxpdf:PdfViewerControl>
</Window>