Skip to content
Closed
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: 0 additions & 1 deletion 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/128598055/20.1.8%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/E4631)
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
<!-- default badges end -->
Expand Down
2 changes: 1 addition & 1 deletion VB/DXSample.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30611.23
MinimumVisualStudioVersion = 10.0.40219.1
Expand Down
5 changes: 5 additions & 0 deletions VB/MinimalisticReportPreviewDemo/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Application x:Class="DXSample.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
12 changes: 12 additions & 0 deletions VB/MinimalisticReportPreviewDemo/App.xaml.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Imports System.Windows

Namespace DXSample

''' <summary>
''' Interaction logic for App.xaml
''' </summary>
Public Partial Class App
Inherits Application

End Class
End Namespace
116 changes: 32 additions & 84 deletions VB/MinimalisticReportPreviewDemo/DXSample.vbproj
Original file line number Diff line number Diff line change
@@ -1,162 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OptionInfer>On</OptionInfer>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{03842F9F-5A5D-4B93-9165-A9B9D325709C}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace></RootNamespace>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>
</RootNamespace>
<AssemblyName>MinimalisticReportPreviewDemo</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
<OptionExplicit>On</OptionExplicit>
<OptionCompare>Binary</OptionCompare>
<OptionStrict>Off</OptionStrict>
<OptionInfer>On</OptionInfer>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<DefineConstants>DEBUG,TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
<RemoveIntegerChecks>true</RemoveIntegerChecks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<RemoveIntegerChecks>true</RemoveIntegerChecks>
</PropertyGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Windows" />
<Import Include="System.Windows.Controls" />
<Import Include="System.Windows.Data" />
<Import Include="System.Windows.Documents" />
<Import Include="System.Windows.Input" />
<Import Include="System.Windows.Media" />
<Import Include="System.Windows.Media.Imaging" />
<Import Include="System.Windows.Navigation" />
<Import Include="System.Windows.Shapes" />
</ItemGroup>
<ItemGroup>
<Reference Include="DevExpress.Charts.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.DataAccess.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.DataAccess.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Office.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Pdf.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Pdf.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.RichEdit.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.RichEdit.v20.1.Export, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Printing.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Utils.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Mvvm.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpf.CodeView.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Data.Desktop.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpf.Core.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpf.DocumentViewer.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpf.Printing.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Xpo.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraCharts.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraGauges.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraPivotGrid.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.PivotGrid.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraPrinting.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraPrinting.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraReports.v20.1.Extensions, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.Sparkline.v20.1.Core, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.CodeParser.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="DevExpress.XtraReports.v20.1, Version=20.1.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand All @@ -175,7 +124,7 @@
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="Application.xaml">
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
Expand All @@ -189,8 +138,8 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="Application.xaml.vb">
<DependentUpon>Application.xaml</DependentUpon>
<Compile Include="App.xaml.vb">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="MainWindow.xaml.vb">
Expand All @@ -200,47 +149,46 @@
</ItemGroup>
<ItemGroup>
<Compile Include="MyDocumentPreviewControl.vb" />
<Compile Include="My Project\AssemblyInfo.vb">
<Compile Include="Properties\AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<Compile Include="Properties\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<Compile Include="Properties\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<EmbeddedResource Include="Properties\licenses.licx" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<CustomToolNamespace>MinimalisticReportPreviewDemo.Properties</CustomToolNamespace>
</EmbeddedResource>
<EmbeddedResource Include="XtraReport1.resx">
<DependentUpon>XtraReport1.vb</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="My Project\Settings.settings">
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
<CustomToolNamespace>My</CustomToolNamespace>
</None>
<AppDesigner Include="My Project\" />
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Content Include="nwind.mdb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
41 changes: 19 additions & 22 deletions VB/MinimalisticReportPreviewDemo/MainWindow.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
Imports System.Windows
Imports System.Windows
Imports DevExpress.Xpf.Core
Imports DevExpress.Xpf.Printing
' ...

' ...
Namespace DXSample
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Partial Public Class MainWindow
Inherits Window

Public Sub New()
InitializeComponent()
End Sub
''' <summary>
''' Interaction logic for MainWindow.xaml
''' </summary>
Public Partial Class MainWindow
Inherits Window

Public Sub New()
Me.InitializeComponent()
End Sub

Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim report As XtraReport1 = New XtraReport1()
Dim preview = New MyDocumentPreviewControl() With {
.DocumentSource = report
}
Dim window = New Window() With {
.Content = preview
}
report.CreateDocument(True)
window.ShowDialog()
End Sub
End Class
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim report As XtraReport1 = New XtraReport1()
Dim preview = New MyDocumentPreviewControl() With {.DocumentSource = report}
Dim window = New Window() With {.Content = preview}
report.CreateDocument(True)
window.ShowDialog()
End Sub
End Class
End Namespace
46 changes: 22 additions & 24 deletions VB/MinimalisticReportPreviewDemo/MyDocumentPreviewControl.vb
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
Imports DevExpress.Xpf.Printing
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports DevExpress.Xpf.Printing
Imports DevExpress.Xpf.Printing.PreviewControl
Imports DevExpress.XtraPrinting

Namespace DXSample
Public Class MyDocumentPreviewControl
Inherits DocumentPreviewControl

Public Overrides Sub Print()
Dim pt As New PrintTool(Document.PrintingSystem)
AddHandler pt.PrintingSystem.StartPrint, AddressOf PrintingSystem_StartPrint
AddHandler pt.PrintingSystem.PrintProgress, AddressOf PrintingSystem_PrintProgress
pt.PrintDialog()
End Sub
Public Overrides Sub PrintDirect(Optional ByVal printerName As String = Nothing)
Dim pt As New PrintTool(Document.PrintingSystem)
AddHandler pt.PrintingSystem.StartPrint, AddressOf PrintingSystem_StartPrint
AddHandler pt.PrintingSystem.PrintProgress, AddressOf PrintingSystem_PrintProgress
pt.Print()
End Sub
Private Sub PrintingSystem_PrintProgress(ByVal sender As Object, ByVal e As PrintProgressEventArgs)
Public Class MyDocumentPreviewControl
Inherits DocumentPreviewControl

End Sub
Private Sub PrintingSystem_StartPrint(ByVal sender As Object, ByVal e As PrintDocumentEventArgs)
Public Overrides Sub Print()
Dim pt As PrintTool = New PrintTool(Document.PrintingSystem)
pt.PrintingSystem.StartPrint += New PrintDocumentEventHandler(AddressOf PrintingSystem_StartPrint)
pt.PrintingSystem.PrintProgress += New PrintProgressEventHandler(AddressOf PrintingSystem_PrintProgress)
pt.PrintDialog()
End Sub

End Sub
End Class
Public Overrides Sub PrintDirect(ByVal Optional printerName As String = Nothing)
Dim pt As PrintTool = New PrintTool(Document.PrintingSystem)
pt.PrintingSystem.StartPrint += New PrintDocumentEventHandler(AddressOf PrintingSystem_StartPrint)
pt.PrintingSystem.PrintProgress += New PrintProgressEventHandler(AddressOf PrintingSystem_PrintProgress)
pt.Print()
End Sub

Private Sub PrintingSystem_PrintProgress(ByVal sender As Object, ByVal e As PrintProgressEventArgs)
End Sub

Private Sub PrintingSystem_StartPrint(ByVal sender As Object, ByVal e As PrintDocumentEventArgs)
End Sub
End Class
End Namespace
Loading