diff --git a/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.csproj b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.csproj new file mode 100644 index 0000000..2cf5046 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {D8283AF1-7E48-4DE5-B83E-E1E1F9C88152} + WinExe + AddButtonsInVerticalToolbar + AddButtonsInVerticalToolbar + v4.8 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.sln b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.sln new file mode 100644 index 0000000..7e4470f --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35707.178 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddButtonsInVerticalToolbar", "AddButtonsInVerticalToolbar.csproj", "{D8283AF1-7E48-4DE5-B83E-E1E1F9C88152}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D8283AF1-7E48-4DE5-B83E-E1E1F9C88152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D8283AF1-7E48-4DE5-B83E-E1E1F9C88152}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D8283AF1-7E48-4DE5-B83E-E1E1F9C88152}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D8283AF1-7E48-4DE5-B83E-E1E1F9C88152}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.csproj b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.csproj new file mode 100644 index 0000000..c3ac96f --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.csproj @@ -0,0 +1,16 @@ + + + + WinExe + net8.0-windows + enable + enable + true + + + + + + + + diff --git a/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.sln b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.sln new file mode 100644 index 0000000..121bd10 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/AddButtonsInVerticalToolbar_NET.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35707.178 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddButtonsInVerticalToolbar_NET", "AddButtonsInVerticalToolbar_NET.csproj", "{64C42154-1D65-4D2D-80E2-81C3BF55D531}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64C42154-1D65-4D2D-80E2-81C3BF55D531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64C42154-1D65-4D2D-80E2-81C3BF55D531}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64C42154-1D65-4D2D-80E2-81C3BF55D531}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64C42154-1D65-4D2D-80E2-81C3BF55D531}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Toolbar/AddButtonsInVerticalToolbar/App.config b/Toolbar/AddButtonsInVerticalToolbar/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Toolbar/AddButtonsInVerticalToolbar/App.xaml b/Toolbar/AddButtonsInVerticalToolbar/App.xaml new file mode 100644 index 0000000..f90db15 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Toolbar/AddButtonsInVerticalToolbar/App.xaml.cs b/Toolbar/AddButtonsInVerticalToolbar/App.xaml.cs new file mode 100644 index 0000000..9720f2b --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace AddButtonsInVerticalToolbar +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Toolbar/AddButtonsInVerticalToolbar/Data/PDF_Succinctly.pdf b/Toolbar/AddButtonsInVerticalToolbar/Data/PDF_Succinctly.pdf new file mode 100644 index 0000000..706d6f2 Binary files /dev/null and b/Toolbar/AddButtonsInVerticalToolbar/Data/PDF_Succinctly.pdf differ diff --git a/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml b/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml new file mode 100644 index 0000000..17c7a58 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml @@ -0,0 +1,22 @@ + + + + + + diff --git a/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml.cs b/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml.cs new file mode 100644 index 0000000..02802cf --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/MainWindow.xaml.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Syncfusion.Windows.PdfViewer; +using Syncfusion.Windows.Tools.Controls; + +namespace AddButtonsInVerticalToolbar +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : RibbonWindow + { + public MainWindow() + { + InitializeComponent(); + } + + private void RibbonWindow_Loaded(object sender, RoutedEventArgs e) + { + OutlinePane outlinePane = pdfViewer.Template.FindName("PART_OutlinePane", pdfViewer) as OutlinePane; + + StackPanel stackPanel = (StackPanel)outlinePane.Template.FindName("PART_OutlineStackPanel", outlinePane); + + Button button1 = new Button(); + button1.Margin = new Thickness(0, 8, 0, 8); + button1.Width = 30; + button1.Height = 25; + button1.Content = "B1"; + stackPanel.Children.Add(button1); + button1.Click += Button1_Click; ; + + Button button2 = new Button(); + button2.Margin = new Thickness(0, 4, 0, 8); + button2.Width = 30; + button2.Height = 25; + button2.Content = "B2"; + stackPanel.Children.Add(button2); + button2.Click += Button2_Click; ; + } + + private void Button1_Click(object sender, RoutedEventArgs e) + { + string urlToOpen = "https://help.syncfusion.com/wpf/pdf-viewer/overview"; + Process.Start(new ProcessStartInfo + { + FileName = urlToOpen, + UseShellExecute = true + }); + } + + private void Button2_Click(object sender, RoutedEventArgs e) + { + string urlToOpen = "https://help.syncfusion.com/wpf/pdf-viewer/getting-started"; + Process.Start(new ProcessStartInfo + { + FileName = urlToOpen, + UseShellExecute = true + }); + } + } +} diff --git a/Toolbar/AddButtonsInVerticalToolbar/PdfReport.cs b/Toolbar/AddButtonsInVerticalToolbar/PdfReport.cs new file mode 100644 index 0000000..04e394f --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/PdfReport.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AddButtonsInVerticalToolbar +{ + internal class PdfReport : INotifyPropertyChanged + { + string filePath; + private Stream docStream; + public event PropertyChangedEventHandler PropertyChanged; + + public Stream DocumentStream + { + get + { + return docStream; + } + set + { + docStream = value; + OnPropertyChanged(new PropertyChangedEventArgs("DocumentStream")); + } + } + + public PdfReport() + { +#if NETCOREAPP + filePath = @"../../../Data/PDF_Succinctly.pdf"; +#else + filePath = @"../../Data/PDF_Succinctly.pdf"; +#endif + //Load the stream from the local system. + docStream = new FileStream(filePath, FileMode.OpenOrCreate); + } + + public void OnPropertyChanged(PropertyChangedEventArgs e) + { + if (PropertyChanged != null) + PropertyChanged(this, e); + } + } +} diff --git a/Toolbar/AddButtonsInVerticalToolbar/Properties/AssemblyInfo.cs b/Toolbar/AddButtonsInVerticalToolbar/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2f328d5 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/Properties/AssemblyInfo.cs @@ -0,0 +1,46 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyDescription("")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// diff --git a/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.Designer.cs b/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.Designer.cs new file mode 100644 index 0000000..7423cb0 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AddButtonsInVerticalToolbar.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AddButtonsInVerticalToolbar.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.resx b/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.Designer.cs b/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.Designer.cs new file mode 100644 index 0000000..d16d5b1 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AddButtonsInVerticalToolbar.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.settings b/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Toolbar/AddButtonsInVerticalToolbar/packages.config b/Toolbar/AddButtonsInVerticalToolbar/packages.config new file mode 100644 index 0000000..34f55c1 --- /dev/null +++ b/Toolbar/AddButtonsInVerticalToolbar/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file