Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @DevExpressExampleBot
5 changes: 2 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!-- default badges list -->
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128658561/24.2.1%2B)
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T612865)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
Expand All @@ -23,7 +22,7 @@ This example customizes the page content popup menu - removes specific items and
<!-- feedback -->
## Does this example address your development requirements/objectives?

[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=how-to-customize-the-popup-menu-t612865&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=how-to-customize-the-popup-menu-t612865&~~~was_helpful=no)
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-pdf-viewer-customize-the-popup-menu&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=wpf-pdf-viewer-customize-the-popup-menu&~~~was_helpful=no)

(you will be redirected to DevExpress.com to submit your response)
<!-- feedback end -->
<!-- feedback end -->
2 changes: 1 addition & 1 deletion VB/App.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Expand Down
3 changes: 2 additions & 1 deletion VB/App.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Imports System.Windows
Imports System.Linq
Imports System.Threading.Tasks

Namespace PopupMenuShowing

Expand Down
Binary file modified VB/Demo.pdf
Binary file not shown.
15 changes: 5 additions & 10 deletions VB/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
Imports System.Windows
Imports DevExpress.Xpf.PdfViewer
Imports DevExpress.Xpf.Bars

Namespace PopupMenuShowing

Partial Public Class MainWindow
Public Partial Class MainWindow
Inherits Window

Public Sub New()
InitializeComponent()

' Load a document.
viewer.OpenDocument("..\..\Demo.pdf")
End Sub

Private Sub Viewer_PopupMenuShowing(ByVal d As DependencyObject, ByVal e As PopupMenuShowingEventArgs)

' Remove the Hand tool item from the page context popup menu.
Dim removeHandTool As New RemoveAction()
Dim removeHandTool As RemoveAction = New RemoveAction()
removeHandTool.ElementName = DefaultPdfBarManagerItemNames.HandTool
e.Actions.Add(removeHandTool)

' Remove the Select All item from the page context popup menu.
Dim removeSelectAll As New RemoveAction()
Dim removeSelectAll As RemoveAction = New RemoveAction()
removeSelectAll.ElementName = DefaultPdfBarManagerItemNames.SelectAll
e.Actions.Add(removeSelectAll)

' Insert the "Save As..." item invoking the Save As dialog.
Dim barButtonItem As New BarButtonItem()
Dim barButtonItem As BarButtonItem = New BarButtonItem()
barButtonItem.Content = "Save As..."
barButtonItem.Command = viewer.SaveAsCommand
Dim insertBarButtonItem As New InsertAction()
Dim insertBarButtonItem As InsertAction = New InsertAction()
insertBarButtonItem.ContainerName = DefaultPdfBarManagerItemNames.ContextMenu
insertBarButtonItem.Element = barButtonItem
e.Actions.Add(insertBarButtonItem)
Expand Down
26 changes: 10 additions & 16 deletions VB/PopupMenuShowing.vbproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OptionInfer>On</OptionInfer>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<RootNamespace></RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>false</UseWindowsForms>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<EnableDefaultApplicationDefinition>false</EnableDefaultApplicationDefinition>
</PropertyGroup>
<ItemGroup>
<Compile Update="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<AppDesigner Include="My Project\" />
<ApplicationDefinition Include="App.xaml" />
</ItemGroup>
<ItemGroup>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevExpress.Wpf.Printing" Version="24.2.*" />
<PackageReference Include="DevExpress.Wpf.PdfViewer" Version="24.2.*" />
<PackageReference Include="DevExpress.Wpf.Themes.Office2016White" Version="24.2.*" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="DevExpress.Wpf.Themes.Office2016White" Version="24.2.*" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion VB/Properties/AssemblyInfo.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Imports System.Reflection
Imports System.Resources
Imports System.Runtime.InteropServices
Imports System.Windows

' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
Expand Down