Skip to content

Commit 5144ce0

Browse files
911054_thumbnail
1 parent 4b18dec commit 5144ce0

File tree

9 files changed

+122
-0
lines changed

9 files changed

+122
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Solution>
2+
<Project Path="Programatic_thumbnail/Programatic_thumbnail.csproj" />
3+
</Solution>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="Programatic_thumbnail.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:Programatic_thumbnail"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Configuration;
2+
using System.Data;
3+
using System.Windows;
4+
5+
namespace Programatic_thumbnail
6+
{
7+
/// <summary>
8+
/// Interaction logic for App.xaml
9+
/// </summary>
10+
public partial class App : Application
11+
{
12+
}
13+
14+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Windows;
2+
3+
[assembly: ThemeInfo(
4+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5+
//(used if a resource is not found in the page,
6+
// or application resource dictionaries)
7+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8+
//(used if a resource is not found in the page,
9+
// app, or any theme specific resource dictionaries)
10+
)]
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Window x:Class="Programatic_thumbnail.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:Programatic_thumbnail"
7+
mc:Ignorable="d"
8+
xmlns:PdfViewer="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"
9+
Title="MainWindow" Height="450" Width="800">
10+
<Grid>
11+
<PdfViewer:PdfViewerControl Grid.Row="1" Name="pdfViewer" DocumentLoaded="pdfViewer_DocumentLoaded"/>
12+
13+
</Grid>
14+
</Window>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using Syncfusion.Windows.PdfViewer;
2+
using System;
3+
using System.Text;
4+
using System.Windows;
5+
using System.Windows.Controls;
6+
using System.Windows.Data;
7+
using System.Windows.Documents;
8+
using System.Windows.Input;
9+
using System.Windows.Media;
10+
using System.Windows.Media.Imaging;
11+
using System.Windows.Navigation;
12+
using System.Windows.Shapes;
13+
14+
namespace Programatic_thumbnail
15+
{
16+
/// <summary>
17+
/// Interaction logic for MainWindow.xaml
18+
/// </summary>
19+
public partial class MainWindow : Window
20+
{
21+
public MainWindow()
22+
{
23+
InitializeComponent();
24+
this.WindowState = WindowState.Maximized;
25+
pdfViewer.Load("../../../F#.pdf");
26+
pdfViewer.ThumbnailSettings.IsExpanded = true;
27+
}
28+
private void pdfViewer_DocumentLoaded(object sender, EventArgs args)
29+
{
30+
Grid LeftToolGrid = pdfViewer.Template.FindName("PART_Grid", pdfViewer) as Grid;
31+
if (LeftToolGrid != null)
32+
{
33+
foreach (var LeftToolChild in LeftToolGrid.Children)
34+
{
35+
if (LeftToolChild is ThumbnailPane)
36+
{
37+
StackPanel stackPanel = (LeftToolChild as ThumbnailPane).Template.FindName("Thumb_StackPanel", (LeftToolChild as ThumbnailPane)) as StackPanel;
38+
foreach (var stackPanelChild in stackPanel.Children)
39+
{
40+
if (stackPanelChild is Slider)
41+
{
42+
(stackPanelChild as Slider).Value = 12;
43+
}
44+
}
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Syncfusion.PdfViewer.WPF" Version="*" />
9+
</ItemGroup>
10+
<Import Project="targets\MultiTargeting.targets" />
11+
12+
</Project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFrameworks>net462;net8.0-windows;net9.0-windows;net10.0-windows</TargetFrameworks>
4+
<UseWPF>true</UseWPF>
5+
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
6+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
7+
<EnableDefaultItems>True</EnableDefaultItems>
8+
<EnableDefaultEmbeddedResourceItems>True</EnableDefaultEmbeddedResourceItems>
9+
</PropertyGroup>
10+
</Project>

0 commit comments

Comments
 (0)