-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
65 lines (58 loc) · 4.05 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<Window x:Class="CustomizePreviewToolbar.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:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
Title="MainWindow" Height="650" Width="1100">
<Window.Resources>
<DataTemplate x:Key="dayNameTemplate">
<dxe:TextEdit IsPrintingMode="True" Text="{Binding Path=Content}"/>
</DataTemplate>
</Window.Resources>
<Grid>
<dxp:DocumentPreviewControl Name="preview">
<dxp:DocumentPreviewControl.CommandProvider>
<dxp:DocumentCommandProvider>
<dxp:DocumentCommandProvider.RibbonActions>
<dxb:UpdateAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Print}"
Property="{x:Static dxb:BarItem.LargeGlyphProperty}"
Value="{dxp:PrintingResourceImage ResourceName='Images/BarItems/Print.svg'}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Export}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.FileGroup}"/>
<dxb:InsertAction>
<dxb:InsertAction.Element>
<dxr:RibbonPageGroup Caption="Custom Commands" Name="CustomCommandGroup"/>
</dxb:InsertAction.Element>
</dxb:InsertAction>
<dxb:InsertAction ContainerName="CustomCommandGroup">
<dxb:InsertAction.Element>
<dxb:BarButtonItem Content="Create Document" ItemClick="CreateDocument_ItemClick"/>
</dxb:InsertAction.Element>
</dxb:InsertAction>
<dxb:InsertAction ContainerName="CustomCommandGroup">
<dxb:InsertAction.Element>
<dxb:BarButtonItem Content="Clear Preview" ItemClick="ClearPreview_ItemClick" />
</dxb:InsertAction.Element>
</dxb:InsertAction>
<dxb:InsertAction ContainerName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportGroup}">
<dxb:InsertAction.Element>
<dxb:BarButtonItem Content="{dxp:PrintingStringId StringId=ExportPdf}"
LargeGlyph="{dxp:PrintingResourceImage ResourceName='Images/BarItems/ExportPDF.svg'}"
Glyph="{dxp:PrintingResourceImage ResourceName='Images/BarItems/ExportPDF.svg'}"
Hint="{dxp:PrintingStringId StringId=ExportPdf}"
Command="{Binding Path=(dxp:DocumentPreviewControl.ActualViewer).ExportCommand,
RelativeSource={RelativeSource Self}}"
CommandParameter="Pdf"/>
</dxb:InsertAction.Element>
</dxb:InsertAction>
</dxp:DocumentCommandProvider.RibbonActions>
</dxp:DocumentCommandProvider>
</dxp:DocumentPreviewControl.CommandProvider>
</dxp:DocumentPreviewControl>
</Grid>
</Window>