File tree Expand file tree Collapse file tree 3 files changed +11
-29
lines changed
DisplayPDF_fundamental_syntax_errors Expand file tree Collapse file tree 3 files changed +11
-29
lines changed Original file line number Diff line number Diff line change 6
6
xmlns : local =" clr-namespace:LoadFundamentalSyntaxErrorDocument"
7
7
xmlns : syncfusion =" clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"
8
8
mc : Ignorable =" d"
9
- Title =" MainWindow" Height = " 450 " Width = " 800 " >
9
+ Title =" MainWindow" WindowState = " Maximized " >
10
10
<Window .DataContext>
11
11
<local : MainWindowViewModel />
12
12
</Window .DataContext>
15
15
<RowDefinition Height =" Auto" />
16
16
<RowDefinition />
17
17
</Grid .RowDefinitions>
18
- <Grid Grid.Row=" 0"
18
+ <StackPanel Grid.Row=" 0" Orientation = " Horizontal "
19
19
Margin =" 12" >
20
- <Grid .ColumnDefinitions>
21
- <ColumnDefinition Width =" 70*" />
22
- <ColumnDefinition Width =" 30*" />
23
- </Grid .ColumnDefinitions>
24
- <TextBlock Text =" {Binding FilePath, TargetNullValue=No file selected, StringFormat={}File: {0}}" />
25
20
<Button Content =" Open"
26
- Command =" {Binding OpenPDFFileCommand}"
27
- Grid.Column=" 1" />
28
- </Grid >
29
- <syncfusion : PdfDocumentView Grid.Row=" 1"
21
+ Command =" {Binding OpenPDFFileCommand}"
22
+ Width =" 50"
23
+ Height =" 30" />
24
+ </StackPanel >
25
+ <syncfusion : PdfViewerControl Grid.Row=" 1"
30
26
Margin =" 12"
31
27
ZoomMode =" FitPage"
32
28
ItemSource =" {Binding PdfDocument, UpdateSourceTrigger=PropertyChanged}" />
Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Text ;
5
- using System . Threading . Tasks ;
6
- using System . Windows ;
7
- using System . Windows . Controls ;
8
- using System . Windows . Data ;
9
- using System . Windows . Documents ;
10
- using System . Windows . Input ;
11
- using System . Windows . Media ;
12
- using System . Windows . Media . Imaging ;
13
- using System . Windows . Navigation ;
14
- using System . Windows . Shapes ;
1
+ using System . Windows ;
15
2
16
3
namespace LoadFundamentalSyntaxErrorDocument
17
4
{
Original file line number Diff line number Diff line change 1
- using System ;
2
- using CommunityToolkit . Mvvm . ComponentModel ;
1
+ using CommunityToolkit . Mvvm . ComponentModel ;
3
2
using CommunityToolkit . Mvvm . Input ;
4
3
using Microsoft . Win32 ;
5
4
using Syncfusion . Pdf . Parsing ;
6
5
using System . IO ;
7
- using System . Xml . Linq ;
8
6
9
7
namespace LoadFundamentalSyntaxErrorDocument
10
8
{
@@ -33,7 +31,8 @@ private void OpenPDFFile()
33
31
{
34
32
var dialog = new OpenFileDialog
35
33
{
36
- Filter = "PDF files (*.pdf)|*.pdf"
34
+ Filter = "PDF files (*.pdf)|*.pdf" ,
35
+ InitialDirectory = Environment . GetFolderPath ( Environment . SpecialFolder . Desktop ) ,
37
36
} ;
38
37
if ( dialog . ShowDialog ( ) == true )
39
38
{
You can’t perform that action at this time.
0 commit comments