Skip to content

Commit 9f0539c

Browse files
committed
feedbacks addressed
1 parent 7051258 commit 9f0539c

File tree

3 files changed

+8
-72
lines changed

3 files changed

+8
-72
lines changed

How-to/ViewPDFInWinforms/Form1.cs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,23 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
9-
using System.Windows.Forms;
1+
using System.Windows.Forms;
102
using Syncfusion.Windows.Forms.PdfViewer;
113

124
namespace ViewPDFInWinforms
135
{
146
public partial class Form1 : Form
157
{
16-
string filePath;
178
public Form1()
189
{
1910
InitializeComponent();
11+
//Opening the form in maximized state
12+
this.WindowState = FormWindowState.Maximized;
2013
//Initializing the PdfViewerControl
2114
PdfViewerControl pdfViewerControl1 = new PdfViewerControl();
22-
2315
//Add PdfViewerControl to the Form
2416
Controls.Add(pdfViewerControl1);
2517
//Docking the control to all edges of its containing control and sizing appropriately.
2618
pdfViewerControl1.Dock = DockStyle.Fill;
27-
#if NETCOREAPP
28-
filePath = @"../../../Data/PDF_Succinctly.pdf";
29-
#else
30-
filePath = @"../../Data/PDF_Succinctly.pdf";
31-
#endif
3219
//Loading the document in the PdfViewerControl
33-
pdfViewerControl1.Load(filePath);
20+
pdfViewerControl1.Load(@"../../../Data/PDF_Succinctly.pdf");
3421
}
3522
}
3623
}
Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4-
<PropertyGroup>
2+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <PropertyGroup>
53
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
64
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
75
<ProjectGuid>{B17764AA-7541-47A2-B1B1-B7087E473FF5}</ProjectGuid>
86
<OutputType>WinExe</OutputType>
97
<RootNamespace>ViewPDFusingPDFWinforms</RootNamespace>
108
<AssemblyName>ViewPDFusingPDFWinforms</AssemblyName>
11-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
9+
<TargetFramework>net48</TargetFramework>
1210
<FileAlignment>512</FileAlignment>
1311
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1412
<Deterministic>true</Deterministic>
15-
<TargetFrameworkProfile />
13+
<LangVersion>latest</LangVersion>
14+
<UseWindowsForms>true</UseWindowsForms>
1615
</PropertyGroup>
1716
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1817
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -34,50 +33,9 @@
3433
<WarningLevel>4</WarningLevel>
3534
</PropertyGroup>
3635
<ItemGroup>
37-
<Reference Include="System" />
3836
<PackageReference Include="Syncfusion.PdfViewer.Windows" version="*" />
39-
<Reference Include="System.Core" />
40-
<Reference Include="System.Xml.Linq" />
41-
<Reference Include="System.Data.DataSetExtensions" />
42-
<Reference Include="Microsoft.CSharp" />
43-
<Reference Include="System.Data" />
44-
<Reference Include="System.Deployment" />
45-
<Reference Include="System.Drawing" />
46-
<Reference Include="System.Net.Http" />
47-
<Reference Include="System.Windows.Forms" />
48-
<Reference Include="System.Xml" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<Compile Include="Form1.cs">
52-
<SubType>Form</SubType>
53-
</Compile>
54-
<Compile Include="Form1.Designer.cs">
55-
<DependentUpon>Form1.cs</DependentUpon>
56-
</Compile>
57-
<Compile Include="Program.cs" />
58-
<Compile Include="Properties\AssemblyInfo.cs" />
59-
<EmbeddedResource Include="Properties\Resources.resx">
60-
<Generator>ResXFileCodeGenerator</Generator>
61-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
62-
<SubType>Designer</SubType>
63-
</EmbeddedResource>
64-
<Compile Include="Properties\Resources.Designer.cs">
65-
<AutoGen>True</AutoGen>
66-
<DependentUpon>Resources.resx</DependentUpon>
67-
</Compile>
68-
<None Include="packages.config" />
69-
<None Include="Properties\Settings.settings">
70-
<Generator>SettingsSingleFileGenerator</Generator>
71-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
72-
</None>
73-
<Compile Include="Properties\Settings.Designer.cs">
74-
<AutoGen>True</AutoGen>
75-
<DependentUpon>Settings.settings</DependentUpon>
76-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
77-
</Compile>
7837
</ItemGroup>
7938
<ItemGroup>
8039
<None Include="App.config" />
8140
</ItemGroup>
82-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8341
</Project>

How-to/ViewPDFInWinforms/packages.config

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)