### Quick Start Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonTaskDialogQuickReference.html Demonstrates the basic setup and display of a KryptonTaskDialog with a title, heading, content, and OK button. ```C# using (KryptonTaskDialog taskDialog = new KryptonTaskDialog()) { taskDialog.Dialog.Form.Text = "My Dialog"; taskDialog.Heading.Text = "Main Message"; taskDialog.Content.Text = "Details here"; taskDialog.FooterBar.CommonButtons.Buttons = KryptonTaskDialogCommonButtonTypes.OK; DialogResult result = taskDialog.ShowDialog(); } ``` -------------------------------- ### Basic Workspace Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Workspace/KryptonWorkspace.html Demonstrates the creation of a basic Krypton workspace and setting its root sequence. ```csharp // Create a basic workspace KryptonWorkspace workspace = new KryptonWorkspace(); workspace.Dock = DockStyle.Fill; // Create the root sequence KryptonWorkspaceSequence rootSequence = new KryptonWorkspaceSequence(Orientation.Horizontal); workspace.Root = rootSequence; // Add cells to the workspace KryptonWorkspaceCell leftCell = new KryptonWorkspaceCell(); KryptonWorkspaceCell rightCell = new KryptonWorkspaceCell(); rootSequence.Children.Add(leftCell); rootSequence.Children.Add(rightCell); ``` -------------------------------- ### Complete KryptonHelpProvider Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonHelpProvider.html A comprehensive example demonstrating the initialization and configuration of KryptonHelpProvider, including setting tooltip properties, configuring help strings for multiple controls, and handling the HelpRequested event. ```csharp public partial class MyForm : KryptonForm { private KryptonHelpProvider helpProvider; public MyForm() { InitializeComponent(); InitializeHelp(); } private void InitializeHelp() { // Create help provider helpProvider = new KryptonHelpProvider(); // Set container control for tooltip functionality helpProvider.ContainerControl = this; // Configure tooltip appearance helpProvider.ToolTipValues.EnableToolTips = true; helpProvider.ToolTipValues.ToolTipStyle = LabelStyle.ToolTip; helpProvider.ToolTipValues.ToolTipShadow = true; helpProvider.ToolTipValues.ShowIntervalDelay = 500; helpProvider.ToolTipValues.CloseIntervalDelay = 5000; // Set help strings for controls helpProvider.SetShowHelp(textBoxName, true); helpProvider.SetHelpString(textBoxName, "Enter your full name"); helpProvider.SetShowHelp(textBoxEmail, true); helpProvider.SetHelpString(textBoxEmail, "Enter a valid email address"); // Optional: Handle help requests helpProvider.HelpRequested += HelpProvider_HelpRequested; } private void HelpProvider_HelpRequested(object? sender, HelpEventArgs e) { // Custom help handling Control? control = ActiveControl; if (control != null) { string? helpString = helpProvider.GetHelpString(control); if (!string.IsNullOrEmpty(helpString)) { KryptonMessageBox.Show(this, helpString, "Help", KryptonMessageBoxButtons.OK, KryptonMessageBoxIcon.Information); e.Handled = true; } } } } ``` -------------------------------- ### Setup Wizard Choices with KryptonCommandLinkButton Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonCommandLinkButton.html Demonstrates how to create a setup wizard dialog using KryptonCommandLinkButton for different installation types. Each button has a heading and a descriptive text. ```C# __ Copypublic class SetupTypeDialog : KryptonForm { public SetupTypeDialog() { Text = "Choose Setup Type"; var typical = new KryptonCommandLinkButton(); typical.CommandLinkTextValues.Heading = "&Typical"; typical.CommandLinkTextValues.Description = "Recommended for most users. Installs the most common features."; typical.DialogResult = DialogResult.Yes; var complete = new KryptonCommandLinkButton(); complete.CommandLinkTextValues.Heading = "&Complete"; complete.CommandLinkTextValues.Description = "Installs all program features. Requires the most disk space."; complete.DialogResult = DialogResult.No; var custom = new KryptonCommandLinkButton(); custom.CommandLinkTextValues.Heading = "C&ustom"; custom.CommandLinkTextValues.Description = "Choose which features to install. For advanced users."; custom.DialogResult = DialogResult.Retry; } } ``` -------------------------------- ### Basic Toolbar Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonIntegratedToolBarManager.html Demonstrates how to set up a basic integrated toolbar by configuring button visibility, orientation, alignment, and attaching it to the parent form. ```csharp __ Copypublic void SetupBasicToolbar() { var toolbarManager = new KryptonIntegratedToolBarManager(); // Configure button visibility toolbarManager.ShowNewButton = true; toolbarManager.ShowOpenButton = true; toolbarManager.ShowSaveButton = true; toolbarManager.ShowCutButton = true; toolbarManager.ShowCopyButton = true; toolbarManager.ShowPasteButton = true; // Set orientation and alignment toolbarManager.IntegratedToolBarButtonOrientation = PaletteButtonOrientation.FixedTop; toolbarManager.IntegratedToolBarButtonAlignment = PaletteRelativeEdgeAlign.Far; // Attach to parent form toolbarManager.AttachIntegratedToolBarToParent(this); } ``` -------------------------------- ### Basic Form Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Toolkit/KryptonForm.html Demonstrates how to create and display a basic KryptonForm with a title, size, and centered position. ```csharp __ Copy// Create a basic themed form KryptonForm form = new KryptonForm(); form.Text = "My Themed Application"; form.Size = new Size(800, 600); form.StartPosition = FormStartPosition.CenterScreen; form.Show(); ``` -------------------------------- ### Basic Button Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Toolkit/KryptonButton.html Demonstrates how to create and configure a basic KryptonButton with text, size, and a click event handler. ```csharp __ Copy// Create a basic themed button KryptonButton button = new KryptonButton(); button.Text = "Click Me"; button.Size = new Size(100, 30); button.Click += (sender, e) => MessageBox.Show("Button clicked!"); ``` -------------------------------- ### Setup Basic Table Layout in C# Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonTableLayoutPanel.html Example of setting up a basic 3x3 KryptonTableLayoutPanel with KryptonButton controls. This demonstrates docking, column/row styling, and adding controls programmatically. ```csharp __ Copypublic void SetupBasicTableLayout() { var tableLayout = new KryptonTableLayoutPanel { Dock = DockStyle.Fill, ColumnCount = 3, RowCount = 3, BackColor = Color.Transparent }; // Set column styles tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33F)); tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33F)); tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.33F)); // Set row styles tableLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F)); tableLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F)); tableLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33F)); // Add controls for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { var button = new KryptonButton { Text = $"Button {row},{col}", Dock = DockStyle.Fill }; tableLayout.Controls.Add(button, col, row); } } Controls.Add(tableLayout); } ``` -------------------------------- ### Install .NET SDK Preview using WinGet Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/InstallingNETSDKPreviewVersions.html Use this command to install the latest .NET SDK Preview version via WinGet. Ensure you have WinGet installed and configured. ```bash winget install Microsoft.DotNet.SDK.Preview ``` -------------------------------- ### Adding New .NET Versions to Setup Step Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Workflows/BuildWorkflow.html Demonstrates how to add new .NET SDK versions to the 'Setup .NET' step in the build workflow configuration. ```yaml steps: - name: Setup .NET uses: actions/setup-dotnet@v3 with: dotnet-version: | 9.0.x 10.0.x 11.0.x # New version ``` -------------------------------- ### Basic Docking Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Docking/KryptonDocking.html Demonstrates the initial setup of a KryptonDocking environment by creating a dockspace and an auto-hidden panel, then adding them to a form. ```csharp __ Copy// Create a docking space KryptonDockspace dockspace = new KryptonDockspace(); dockspace.Dock = DockStyle.Fill; // Create auto-hidden panel KryptonAutoHiddenPanel autoHiddenPanel = new KryptonAutoHiddenPanel(); autoHiddenPanel.Dock = DockStyle.Left; // Add to form form.Controls.Add(dockspace); form.Controls.Add(autoHiddenPanel); ``` -------------------------------- ### Basic Usage Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/CommandLinkTextValues.html Example demonstrating how to set the heading and description for a CommandLink. ```APIDOC ## Basic Usage ### Example ```csharp var commandLink = new KryptonCommandLinkButton(); // Set text values commandLink.CommandLinkTextValues.Heading = "Open File"; commandLink.CommandLinkTextValues.Description = "Browse for and open an existing file"; ``` ``` -------------------------------- ### Full Customization Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Utilities/KryptonMessageBoxExtended.html Demonstrates using the most comprehensive Show overload to customize font, icon, button defaults, and text alignment. Requires custom font and image file setup. ```csharp __ Copyvar customFont = new Font("Segoe UI", 12, FontStyle.Bold); var customIcon = Image.FromFile("custom-icon.png"); var result = KryptonMessageBoxExtended.Show( "This is a fully customized message box", "Custom Dialog", ExtendedMessageBoxButtons.YesNoCancel, ExtendedKryptonMessageBoxIcon.Custom, defaultButton: KryptonMessageBoxDefaultButton.Button2, displayHelpButton: true, messageBoxTypeface: customFont, customImageIcon: customIcon, messageTextAlignment: ContentAlignment.TopCenter ); ``` -------------------------------- ### Basic Status Strip Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonStatusStrip.html Demonstrates how to set up a basic KryptonStatusStrip with a label, progress bar, separator, and a spring-loaded time label. Add the status strip to the form's controls. ```csharp public void SetupBasicStatusStrip() { var statusStrip = new KryptonStatusStrip(); // Add status label var statusLabel = new ToolStripStatusLabel("Ready"); statusStrip.Items.Add(statusLabel); // Add progress bar var progressBar = new ToolStripProgressBar(); statusStrip.Items.Add(progressBar); // Add separator statusStrip.Items.Add(new ToolStripSeparator()); // Add time label var timeLabel = new ToolStripStatusLabel(); timeLabel.Spring = true; // Fill remaining space timeLabel.TextAlign = ContentAlignment.MiddleRight; statusStrip.Items.Add(timeLabel); Controls.Add(statusStrip); } ``` -------------------------------- ### Application Main Status Strip Integration Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonStatusStrip.html Provides a complete example of integrating KryptonStatusStrip into an application's main form. It includes setup for status labels, progress bars, connection indicators, and time/version displays, along with timer-based updates. ```csharp __ Copypublic partial class MainApplicationForm : Form { private KryptonStatusStrip mainStatusStrip; private ToolStripStatusLabel statusLabel; private ToolStripProgressBar mainProgressBar; private ToolStripStatusLabel connectionLabel; private ToolStripStatusLabel timeLabel; private ToolStripStatusLabel versionLabel; public MainApplicationForm() { InitializeComponent(); SetupMainStatusStrip(); } private void SetupMainStatusStrip() { mainStatusStrip = new KryptonStatusStrip(); // Main status label statusLabel = new ToolStripStatusLabel("Application Ready") { Spring = true, TextAlign = ContentAlignment.MiddleLeft }; // Main progress bar mainProgressBar = new ToolStripProgressBar { Name = "MainProgress", Visible = false, Size = new Size(200, 16) }; // Connection status connectionLabel = new ToolStripStatusLabel("Disconnected") { TextAlign = ContentAlignment.MiddleRight }; // Time display timeLabel = new ToolStripStatusLabel { TextAlign = ContentAlignment.MiddleRight }; // Version info versionLabel = new ToolStripStatusLabel($"v{Application.ProductVersion}") { TextAlign = ContentAlignment.MiddleRight }; mainStatusStrip.Items.AddRange(new ToolStripItem[] { statusLabel, new ToolStripSeparator(), mainProgressBar, new ToolStripSeparator(), connectionLabel, timeLabel, versionLabel }); Controls.Add(mainStatusStrip); // Update time every second var timer = new Timer { Interval = 1000 }; timer.Tick += OnTimerTick; timer.Start(); } private void OnTimerTick(object? sender, EventArgs e) { timeLabel.Text = DateTime.Now.ToString("HH:mm:ss"); } public void SetStatus(string message) { statusLabel.Text = message; } public void ShowProgress(int value, int maximum = 100) { mainProgressBar.Maximum = maximum; mainProgressBar.Value = value; mainProgressBar.Visible = true; } public void HideProgress() { mainProgressBar.Visible = false; } public void UpdateConnectionStatus(bool connected) { connectionLabel.Text = connected ? "Connected" : "Disconnected"; connectionLabel.ForeColor = connected ? Color.Green : Color.Red; } } ``` -------------------------------- ### Theme Management: Get and Set Themes Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Forms/KryptonSystemMenuQuickReference.html Examples for retrieving the current icon theme and applying specific themes by name or type. Includes refreshing icons after changes. ```csharp __ Copy// Get current theme var theme = systemMenu.CurrentIconTheme; // Set specific theme systemMenu.SetIconTheme("Office2010"); // Set by theme type systemMenu.SetThemeType(ThemeType.Office2010Blue); // Refresh after theme change systemMenu.RefreshThemeIcons(); ``` -------------------------------- ### Version Format Examples Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/VersionManagement.html Provides examples of version numbers for stable, beta, and alpha releases, demonstrating the date-based and suffix components. ```text __ Copy100.25.1.305 # Stable release on Jan 31, 2025 (day 305 of year) 100.25.1.305-beta # Canary release on Jan 31, 2025 100.25.1.305-alpha # Nightly release on Jan 31, 2025 ``` -------------------------------- ### Basic BindingNavigator Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonBindingNavigator.html Demonstrates the simplest way to use KryptonBindingNavigator by binding it to a BindingSource. This setup allows for basic data navigation and display. ```csharp __ Copy// Create data source var dataList = new List { new Person { Id = 1, Name = "John Doe" }, new Person { Id = 2, Name = "Jane Smith" }, new Person { Id = 3, Name = "Bob Johnson" } }; // Create BindingSource var bindingSource = new BindingSource { DataSource = dataList, AllowNew = true }; // Bind to navigator kryptonBindingNavigator1.BindingSource = bindingSource; // Bind to DataGridView for display dataGridView1.DataSource = bindingSource; ``` -------------------------------- ### KryptonTaskDialog Complete Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonTaskDialogAPIReference.html A comprehensive example demonstrating the creation and configuration of a KryptonTaskDialog. ```APIDOC ## Complete Example ```csharp using Krypton.Toolkit; // Create dialog using (var taskDialog = new KryptonTaskDialog(700)) { // Configure form taskDialog.Dialog.Form.Text = "Sample Dialog"; taskDialog.Dialog.Form.StartPosition = FormStartPosition.CenterParent; taskDialog.Dialog.Form.RoundedCorners = true; // Configure heading taskDialog.Heading.Visible = true; taskDialog.Heading.Text = "Important Message"; taskDialog.Heading.IconType = KryptonTaskDialogIconType.ShieldInformation; taskDialog.Heading.TextAlignmentHorizontal = PaletteRelativeAlign.Near; // Configure content taskDialog.Content.Visible = true; taskDialog.Content.Text = "This is the main message content.\nIt supports multiple lines."; taskDialog.Content.ContentImage.Image = myImage; taskDialog.Content.ContentImage.Size = new Size(48, 48); taskDialog.Content.ContentImage.Visible = true; taskDialog.Content.ContentImage.PositionedLeft = true; // Configure checkbox taskDialog.CheckBox.Visible = true; taskDialog.CheckBox.Text = "Don't show this again"; // Configure buttons taskDialog.FooterBar.CommonButtons.Buttons = KryptonTaskDialogCommonButtonTypes.OK | KryptonTaskDialogCommonButtonTypes.Cancel; taskDialog.FooterBar.CommonButtons.AcceptButton = KryptonTaskDialogCommonButtonTypes.OK; taskDialog.FooterBar.CommonButtons.CancelButton = KryptonTaskDialogCommonButtonTypes.Cancel; taskDialog.FooterBar.RoundedCorners = true; // Configure footer note taskDialog.FooterBar.Footer.FootNoteText = "Additional information"; taskDialog.FooterBar.Footer.IconType = KryptonTaskDialogIconType.ShieldWarning; // Show dialog DialogResult result = taskDialog.ShowDialog(this); // Check result if (result == DialogResult.OK) { bool dontShowAgain = taskDialog.CheckBox.Checked; // Process result } } ``` ``` -------------------------------- ### Accelerator Key Examples Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Utilities/LocalizationGuide.html Demonstrates how to define accelerator keys for menu items or buttons, showing English and Spanish examples with conflict avoidance. ```csharp // English OK = "&OK" // Alt+O Cancel = "&Cancel" // Alt+C // Spanish - avoid conflicts OK = "&Aceptar" // Alt+A (not Alt+O) Cancel = "Ca&ncelar" // Alt+N (not Alt+C) ``` -------------------------------- ### Installation Progress Wizard with KryptonProgressBar Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonProgressBar.html Illustrates using KryptonProgressBar in an installation wizard to display the progress of sequential installation steps. It customizes the progress bar's appearance, including text backdrop and color based on step criticality. ```C# __ Copypublic class InstallationWizard : Form { private List installationSteps; private int currentStepIndex = 0; public class InstallationStep { public string Name { get; set; } public string Description { get; set; } public int Duration { get; set; } public bool IsCritical { get; set; } } public async Task ExecuteInstallation() { progressBar.Maximum = installationSteps.Count; progressBar.Value = 0; progressBar.ShowTextBackdrop = true; progressBar.TextBackdropColor = Color.FromArgb(200, Color.Black); foreach (var step in installationSteps) { // Update UI stepNameLabel.Text = step.Name; stepDescriptionLabel.Text = step.Description; progressBar.Text = $"Step {currentStepIndex + 1}: {step.Name}"; // Set color based on criticality if (step.IsCritical) { progressBar.ValueBackColorStyle = PaletteColorStyle.LinearRed; } else { progressBar.ValueBackColorStyle = PaletteColorStyle.GlassNormalFull; } // Simulate installation step await SimulateInstallationStep(step); // Update progress progressBar.PerformStep(); currentStepIndex++; } // Completion progressBar.ValueBackColorStyle = PaletteColorStyle.LinearGreen; progressBar.Text = "Installation complete!"; } private async Task SimulateInstallationStep(InstallationStep step) { // Simulate step duration await Task.Delay(step. Duration); } } ``` -------------------------------- ### Installer Build Configuration Properties Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/MSBuildProjectFiles.html Defines properties for building packages for demo installers. ```xml __ CopyInstaller ``` -------------------------------- ### Basic Text Box Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Toolkit/KryptonTextBox.html Demonstrates the creation of a basic KryptonTextBox with initial text and an event handler for text changes. This is a fundamental setup for most applications. ```csharp __ Copy// Create a basic themed text box KryptonTextBox textBox = new KryptonTextBox(); textBox.Size = new Size(200, 25); textBox.Text = "Enter text here"; extBox.TextChanged += (sender, e) => Console.WriteLine("Text changed: " + textBox.Text); ``` -------------------------------- ### Theme Data Configuration Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonThemeBrowser.html Properly set up theme data to ensure the theme browser displays correct and complete information. This example highlights the need to configure all necessary theme properties. ```csharp __ Copyvar themeData = new KryptonThemeBrowserData { Title = "Select Theme", Description = "Choose your preferred theme", // Add all necessary theme configuration // Ensure themes are properly loaded and configured }; ``` -------------------------------- ### GeneralToolkitStrings Complete Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonManagerStringsAPIReference.html Example demonstrating how to configure Spanish localization for message boxes and other controls using GeneralToolkitStrings. ```csharp // Configure Spanish localization for message boxes var general = KryptonManager.Strings.GeneralStrings; general.OK = "&Aceptar"; // Alt+A general.Cancel = "&Cancelar"; // Alt+C general.Yes = "&Sí"; // Alt+S general.No = "&No"; // Alt+N general.Abort = "Abo&rtar"; // Alt+R general.Retry = "&Reintentar"; // Alt+R general.Ignore = "&Ignorar"; // Alt+I general.Close = "C&errar"; // Alt+E general.Today = "&Hoy"; // Alt+H general.Help = "A&yuda"; // Alt+Y general.Continue = "Co&ntinuar"; // Alt+N general.TryAgain = "Reintentar"; // Alt+T // Use in a message box KryptonMessageBox.Show("¿Desea continuar?", "Confirmar", KryptonMessageBoxButtons.YesNo); // Shows buttons with "Sí" and "No" ``` -------------------------------- ### Project File Manager Integration Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonOpenFileDialog.html Provides a complete example of integrating KryptonOpenFileDialog into a ProjectManager class to open project files. It includes setting initial directory, filter, validation, and handling the FileOk event for custom validation. ```csharp __ Copypublic class ProjectManager { public Project? OpenProject() { var dialog = new KryptonOpenFileDialog { Title = "Open Project", InitialDirectory = GetProjectsDirectory(), Filter = "Project Files (*.proj)|*.proj|All Files|*.*", CheckFileExists = true, ValidateNames = true }; dialog.FileOk += OnProjectFileValidating; if (dialog.ShowDialog() == DialogResult.OK) { return LoadProjectFromFile(dialog.FileName); } return null; } private void OnProjectFileValidating(object? sender, CancelEventArgs e) { if (sender is KryptonOpenFileDialog dialog) { if (!IsValidProjectFile(dialog.FileName)) { MessageBox.Show("Invalid project file format.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); e.Cancel = true; } } } } ``` -------------------------------- ### Setup Environment Steps Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/GitHubActionsWorkflows.html Steps for setting up the build environment, including .NET SDKs, MSBuild, and NuGet package caching. ```yaml __ Copy- Setup .NET 9, 10 - Setup .NET Preview (skipped when repository variable USE_DOTNET_PREVIEW=false) - Pin SDK via global.json (stable 10.x/9.x or preview band per variables) - Setup MSBuild, NuGet - Cache NuGet packages ``` -------------------------------- ### StartPage Property Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Utilities/KryptonPrintPreviewControl.html Gets or sets the starting page number for the preview. This is a zero-based index. ```APIDOC ## StartPage Property ### Description Gets or sets the starting page number for the preview. This is a zero-based index. ### Type `int` ### Default Value `0` ### Category Behavior ### Example ``` previewControl.StartPage = 0; // Start at first page previewControl.StartPage = 5; // Start at page 6 (0-based) ``` ### Page Numbering * Zero-based index (0 = first page, 1 = second page, etc.) * Must be within valid page range (0 to page count - 1) * Values outside range are clamped ### Notes * Zero-based index (0 = first page) * Raises `StartPageChanged` event when changed * Must be within valid page range * Used for navigating through multi-page documents ``` -------------------------------- ### WindowChromeStart Method Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Forms/KryptonFormAPIReference.html Performs setup for custom window chrome. This method should be overridden to initialize any custom chrome elements or behaviors. ```csharp __ Copyprotected override void WindowChromeStart() ``` -------------------------------- ### Install and Open MSBuild Structured Log Viewer Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/ModernBuildTool.html Install the MSBuild Structured Log Viewer globally using the .NET CLI, and then use it to open binary build log files for detailed analysis. ```bash __ Copy# Install viewer dotnet tool install --global MSBuildStructuredLogViewer # Open log msbuildlogviewer Logs/nightly-build.binlog ``` -------------------------------- ### Check if WebView2 Runtime is Installed Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Utilities/KryptonWebView2Troubleshooting.html This C# method checks for the presence of the WebView2 runtime by attempting to get the available browser version string. It returns true if the runtime is installed and its version can be retrieved, false otherwise. ```csharp private bool IsWebView2RuntimeInstalled() { try { var version = CoreWebView2Environment.GetAvailableBrowserVersionString(); return !string.IsNullOrEmpty(version); } catch { return false; } } ``` -------------------------------- ### Krypton Data Grid Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Ribbon/Components/BackStage%20View/KryptonRibbonBackstageViewCreatingPages.html Demonstrates the setup of a KryptonDataGridView for displaying tabular data, including adding columns. ```vb.net __ Copyvar dataGrid = new KryptonDataGridView { Dock = DockStyle.Fill, AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill }; dataGrid.Columns.Add("Name", "Name"); dataGrid.Columns.Add("Value", "Value"); ``` -------------------------------- ### Migrate from Standard ToolStrip Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonIntegratedToolBarManager.html Example demonstrating the transition from a standard ToolStrip to the KryptonIntegratedToolBarManager. ```csharp // Old way ToolStrip toolStrip = new ToolStrip(); toolStrip.Items.Add(new ToolStripButton("New")); toolStrip.Items.Add(new ToolStripButton("Open")); // New way var toolbarManager = new KryptonIntegratedToolBarManager(); toolbarManager.ShowNewButton = true; toolbarManager.ShowOpenButton = true; toolbarManager.AttachIntegratedToolBarToParent(parentForm); ``` -------------------------------- ### Default Button Setup Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Toolkit/KryptonButton.html Illustrates how to configure a KryptonButton to act as the default button in a dialog, setting its text and DialogResult. ```csharp __ Copy// Create a default button KryptonButton defaultButton = new KryptonButton(); defaultButton.Text = "OK"; defaultButton.DialogResult = DialogResult.OK; defaultButton.IsDefault = true; ``` -------------------------------- ### Quick Start: Initialize and Show System Menu Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Forms/KryptonSystemMenuQuickReference.html Basic steps to create a KryptonSystemMenu instance, display it at the top-left of the form, and handle keyboard shortcuts. ```csharp __ Copy// 1. Create system menu var systemMenu = new KryptonSystemMenu(myKryptonForm); // 2. Show menu systemMenu.ShowAtFormTopLeft(); // 3. Handle shortcuts protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { return systemMenu.HandleKeyboardShortcut(keyData) || base.ProcessCmdKey(ref msg, keyData); } ``` -------------------------------- ### WindowChromeStart Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Forms/KryptonFormAPIReference.html Performs setup for custom chrome. This is an override method for initiating custom window chrome. ```APIDOC ## WindowChromeStart() ### Description Performs setup for custom chrome. This is an override method for initiating custom window chrome. ### Method `override void WindowChromeStart()` ``` -------------------------------- ### Application Settings Form with KryptonThemeComboBox Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonThemeComboBox.html A comprehensive example demonstrating how to integrate KryptonThemeComboBox into an application settings form, including UI setup and layout management. ```csharp public partial class ApplicationSettingsForm : Form { private KryptonThemeComboBox themeComboBox; private KryptonButton okButton; private KryptonButton cancelButton; public ApplicationSettingsForm() { InitializeComponent(); SetupThemeSettings(); } private void SetupThemeSettings() { // Theme selection section var themeGroup = new KryptonHeaderGroup { Dock = DockStyle.Fill, HeaderStylePrimary = HeaderStyle.Panel }; themeGroup.HeaderPrimary.Content.ShortText = "Theme Settings"; var themeLayout = new KryptonTableLayoutPanel { ColumnCount = 2, RowCount = 2, Dock = DockStyle.Fill, Padding = new Padding(10) }; // Theme label var themeLabel = new KryptonLabel { Text = "Application Theme:", Dock = DockStyle.Fill, LabelStyle = LabelStyle.NormalControl }; // Theme combo box themeComboBox = new KryptonThemeComboBox { Dock = DockStyle.Fill, DropDownStyle = ComboBoxStyle.DropDownList }; // Description label var descriptionLabel = new KryptonLabel { Text = "Select a theme for the application interface. Changes will be applied immediately.", Dock = DockStyle.Fill, LabelStyle = LabelStyle.NormalControl }; // Add to layout themeLayout.Controls.Add(themeLabel, 0, 0); themeLayout.Controls.Add(themeComboBox, 1, 0); themeLayout.Controls.Add(descriptionLabel, 0, 1); themeLayout.SetColumnSpan(descriptionLabel, 2); themeGroup.Panel.Controls.Add(themeLayout); // Buttons okButton = new KryptonButton { Text = "OK", DialogResult = DialogResult.OK }; cancelButton = new KryptonButton { Text = "Cancel", DialogResult = DialogResult.Cancel }; // Main layout var mainLayout = new KryptonTableLayoutPanel { ColumnCount = 1, RowCount = 2, Dock = DockStyle.Fill }; mainLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); mainLayout.RowStyles.Add(new RowStyle(SizeType.Absolute, 40F)); mainLayout.Controls.Add(themeGroup, 0, 0); var buttonLayout = new KryptonTableLayoutPanel { ColumnCount = 2, RowCount = 1, Dock = DockStyle.Fill }; buttonLayout.Controls.Add(okButton, 0, 0); buttonLayout.Controls.Add(cancelButton, 1, 0); mainLayout.Controls.Add(buttonLayout, 0, 1); Controls.Add(mainLayout); } } ``` -------------------------------- ### Basic KryptonNavigator Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Navigator/KryptonNavigator.html Demonstrates the fundamental steps to create and initialize a KryptonNavigator, add pages, and set its docking style and navigation mode. ```C# KryptonNavigator navigator = new KryptonNavigator(); navigator.Dock = DockStyle.Fill; // Set the navigation mode avigator.Mode = NavigatorMode.BarTabGroup; // Add pages KryptonPage page1 = new KryptonPage(); page1.Text = "Page 1"; page1.TextTitle = "First Page"; avigator.Pages.Add(page1); KryptonPage page2 = new KryptonPage(); page2.Text = "Page 2"; page2.TextTitle = "Second Page"; avigator.Pages.Add(page2); ``` -------------------------------- ### Example: Get CommandLink Button Image Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/CommandLinkImageValues.html Demonstrates how to retrieve the image for a command link button's UAC shield icon using the GetImage method. ```csharp IContentValues contentValues = commandLinkButton.UACShieldIcon; Image icon = contentValues.GetImage(PaletteState.Normal); ``` -------------------------------- ### System Browser with HttpListener Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Utilities/OAuth2PKCE.html Demonstrates setting up a system browser flow using HttpListener for handling redirects. This requires a specific redirect URI format and involves creating a PKCE client with custom browser host and redirect handler. ```csharp __ Copyvar redirectHandler = new OAuth2HttpListenerRedirectHandler(); var browserHost = new OAuth2SystemBrowserHost(redirectHandler); var options = OAuth2ProviderPresets.AzureAd(clientId, "http://localhost:8400/callback"); var client = new OAuth2PkceClient(options, browserHost); var tokens = await client.AuthorizeWithBrowserAsync(this, "Sign in"); ``` -------------------------------- ### Access Base PrintPreviewControl Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonPrintPreviewDialog.html Gets the underlying standard .NET PrintPreviewControl for compatibility purposes. This allows access to members of the base control, such as setting the starting page. ```csharp var baseControl = previewDialog.PrintPreviewControlBase; if (baseControl != null) { // Access standard PrintPreviewControl members baseControl.StartPage = 0; } ``` -------------------------------- ### KryptonTaskDialogFormProperties.FormInstance.StartPosition Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonTaskDialogAPIReference.html Gets or sets the dialog start position. Use FormStartPosition.Manual for Location property, CenterScreen for primary screen centering, CenterParent for owner window centering, or WindowsDefaultLocation for Windows default. ```csharp __ Copypublic FormStartPosition StartPosition { get; set; } ``` -------------------------------- ### Build and Package Steps Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/GitHubActionsWorkflows.html Steps for restoring dependencies, building the solution, and packing NuGet packages. ```yaml __ Copy- Restore solution - Build (Scripts/Build/build.proj) - Pack (creates lite + full packages) ``` -------------------------------- ### Creating a Simple Information Page Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Ribbon/Components/BackStage%20View/KryptonRibbonBackstageViewCreatingPages.html Example of creating a basic 'Information' backstage page with application product name, version, and copyright details. ```csharp __ Copyprivate KryptonBackstagePage CreateInfoPage() { var page = new KryptonBackstagePage { Text = "Information", Padding = new Padding(40) }; var title = new KryptonLabel { Text = Application.ProductName, LabelStyle = LabelStyle.TitlePanel, AutoSize = true, Location = new Point(0, 0) }; page.Controls.Add(title); var version = new KryptonLabel { Text = $"Version {Application.ProductVersion}", AutoSize = true, Location = new Point(0, 40) }; page.Controls.Add(version); var copyright = new KryptonLabel { Text = "© 2025 Your Company. All rights reserved.", AutoSize = true, Location = new Point(0, 70) }; page.Controls.Add(copyright); return page; } ``` -------------------------------- ### Validate Print Setup and Show Dialog Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonPrintDialog.html Validates the current print setup and displays the KryptonPrintDialog if the setup is valid. Handles potential errors during validation. ```csharp public class PrinterValidator { public bool ValidatePrintSetup(out string errorMessage) { errorMessage = string.Empty; try { var printSettings = new PrinterSettings(); if (!printSettings.IsValid) { errorMessage = "No printers are installed on this system."; return false; } if (!printSettings.IsPlotter) { // Check for common printer issues if (!printSettings.SupportsColor && RequiresColor()) { errorMessage = "Selected printer does not support color printing."; return false; } } return true; } catch (Exception ex) { errorMessage = $"Printer validation error: {ex.Message}"; return false; } } private bool RequiresColor() { // Determine if current document requires color printing return DocumentHasColor(); } public DialogResult ShowValidatedPrintDialog(PrintDocument document) { if (!ValidatePrintSetup(out string errorMessage)) { MessageBox.Show(errorMessage, "Print Setup Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); return DialogResult.Cancel; } var dialog = new KryptonPrintDialog { Document = document, Title = "Validated Print Setup" }; return dialog.ShowDialog(); } } ``` -------------------------------- ### Krypton Application Quick Start Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Auditing/KryptonQuickReference.html This C# code demonstrates how to set up a basic Krypton application. It initializes a KryptonManager, applies a theme, adds a button and a text box to the form, and includes an event handler for the button click. ```csharp __ Copyusing Krypton.Toolkit; namespace MyKryptonApp { public partial class MainForm : KryptonForm { private readonly KryptonManager _manager = new KryptonManager(); public MainForm() { InitializeComponent(); // Set theme _manager.GlobalPaletteMode = PaletteMode.Microsoft365Blue; // Add controls var button = new KryptonButton { Text = "Click Me!", Location = new Point(10, 10) }; button.Click += Button_Click; Controls.Add(button); var textBox = new KryptonTextBox { Location = new Point(10, 50), Width = 200 }; textBox.CueHint.CueHintText = "Enter text..."; // Watermark Controls.Add(textBox); } private void Button_Click(object sender, EventArgs e) { KryptonMessageBox.Show("Hello, Krypton!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } ``` -------------------------------- ### BeginInit() and EndInit() Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonFileSystemWatcher.html Methods used to begin and end the initialization of the FileSystemWatcher, typically for design-time support. ```APIDOC ## Initialization Methods ### BeginInit() Begins the initialization of the `FileSystemWatcher`. Used for design-time support. ```csharp public void BeginInit() ``` ### EndInit() Ends the initialization of the `FileSystemWatcher`. Used for design-time support. ```csharp public void EndInit() ``` ### Example ```csharp watcher.BeginInit(); watcher.Path = @"C:\MyFolder"; watcher.Filter = "*.txt"; watcher.EndInit(); ``` ``` -------------------------------- ### Basic Ribbon Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/api/Krypton.Ribbon/KryptonRibbon.html Demonstrates how to create a basic KryptonRibbon, add tabs, and groups. ```csharp __ Copy// Create a basic ribbon KryptonRibbon ribbon = new KryptonRibbon(); ribbon.Dock = DockStyle.Top; // Add tabs KryptonRibbonTab homeTab = new KryptonRibbonTab(); homeTab.Text = "Home"; ribbon.RibbonTabs.Add(homeTab); // Add groups to the tab KryptonRibbonGroup clipboardGroup = new KryptonRibbonGroup(); clipboardGroup.Text = "Clipboard"; homeTab.RibbonGroups.Add(clipboardGroup); ``` -------------------------------- ### Basic System Tray Icon Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonNotifyIcon.html Demonstrates how to create and configure a basic system tray icon, including handling click and double-click events. ```csharp __ Copypublic partial class MainForm : KryptonForm { private KryptonNotifyIcon notifyIcon; public MainForm() { InitializeComponent(); // Create notify icon notifyIcon = new KryptonNotifyIcon { Icon = SystemIcons.Application, Text = "My Application", Visible = true }; // Handle click events notifyIcon.Click += NotifyIcon_Click; notifyIcon.DoubleClick += NotifyIcon_DoubleClick; } private void NotifyIcon_Click(object? sender, EventArgs e) { // Show form if minimized if (WindowState == FormWindowState.Minimized) { WindowState = FormWindowState.Normal; Show(); Activate(); } } private void NotifyIcon_DoubleClick(object? sender, EventArgs e) { // Toggle visibility if (Visible) { Hide(); } else { Show(); WindowState = FormWindowState.Normal; Activate(); } } protected override void OnFormClosing(FormClosingEventArgs e) { // Hide to tray instead of closing if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; Hide(); notifyIcon.ShowBalloonTip(2000, "Application", "Application minimized to tray.", ToolTipIcon.Info); } else { notifyIcon?.Dispose(); } base.OnFormClosing(e); } } ``` -------------------------------- ### KryptonTimer Start Method Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonTimer.html Starts the timer. This is equivalent to setting Enabled = true. ```csharp public void Start() ``` ```csharp timer.Start(); ``` -------------------------------- ### Build Standard Toolkit Interactively Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/HowtoBuild.html Run this command from the repository root to launch an interactive menu for building Nightly, Canary, or Stable versions and creating NuGet packages. ```batch run.cmd ``` -------------------------------- ### Installation Wizard: Configuring CommandLinks for UAC Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/CommandLinkImageValues.html This snippet shows how to configure KryptonCommandLinkButtons within an InstallationWizard form. It differentiates between standard installations (no UAC shield) and system-wide installations (requiring UAC shield). ```csharp __ Copypublic class InstallationWizard : KryptonForm { private KryptonCommandLinkButton standardInstall; private KryptonCommandLinkButton customInstall; public InstallationWizard() { standardInstall = new KryptonCommandLinkButton(); standardInstall.CommandLinkTextValues.Heading = "Standard Installation"; standardInstall.CommandLinkTextValues.Description = "Install for current user only (no elevation required)"; standardInstall.UACShieldIcon.DisplayUACShield = false; customInstall = new KryptonCommandLinkButton(); customInstall.CommandLinkTextValues.Heading = "System-Wide Installation"; customInstall.CommandLinkTextValues.Description = "Install for all users (requires administrator privileges)"; customInstall.UACShieldIcon.DisplayUACShield = true; customInstall.UACShieldIcon.UACShieldIconSize = IconSize.Small; } } ``` -------------------------------- ### Basic KryptonToolStripContainer Setup Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonToolStripContainer.html Demonstrates how to create a KryptonToolStripContainer, dock it to fill the available space, and add tool strips to the top and bottom panels, as well as content to the content panel. ```C# var container = new KryptonToolStripContainer { Dock = DockStyle.Fill }; var menuStrip = new KryptonMenuStrip(); container.TopToolStripPanel.Controls.Add(menuStrip); var toolStrip = new KryptonToolStrip(); container.TopToolStripPanel.Controls.Add(toolStrip); var statusStrip = new KryptonStatusStrip(); container.BottomToolStripPanel.Controls.Add(statusStrip); var panel = new KryptonPanel { Dock = DockStyle.Fill }; container.ContentPanel.Controls.Add(panel); ``` -------------------------------- ### KryptonPrintDialog Usage Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonPrintDialog.html Example of how to instantiate and configure a KryptonPrintDialog with a PrintDocument and a custom title. ```csharp var dialog = new KryptonPrintDialog { Document = myPrintDocument, Title = "Print Document" }; ``` -------------------------------- ### Configure Installer Build Versions Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/DirectoryBuildConfiguration.html Sets assembly and NuGet package versions for Installer builds. Uses current date components for versioning. Note: WiX installers require build numbers <= 256. ```xml $([System.DateTime]::Now.ToString(yy)) $([System.DateTime]::Now.ToString(MM)) $([System.DateTime]::Now.get_DayOfYear().ToString()) 100.$(Minor).$(Build).$(Revision) 100.$(Minor).$(Build).$(Revision) ``` -------------------------------- ### Using Help Strings vs. HTML Help Files Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Components/KryptonHelpProvider.html Illustrates the two primary methods for providing help: using simple help strings for contextual tips and HTML Help Files (.chm) for comprehensive documentation. ```csharp // Simple help - use strings helpProvider.HelpNamespace = string.Empty; helpProvider.SetHelpString(control, "Simple help text"); // Complex help - use HTML file helpProvider.HelpNamespace = @"C:\Help\MyApp.chm"; helpProvider.SetHelpKeyword(control, "topic_id"); ``` -------------------------------- ### PaletteChanged Event Handler Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonLinkWrapLabel.html An example of how to subscribe to the PaletteChanged event and log a message when it occurs. ```C# __ CopykryptonLinkWrapLabel1.PaletteChanged += (s, e) => { Console.WriteLine("Palette changed!"); }; ``` -------------------------------- ### Install NuGet Package Including Pre-releases Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/VersionManagement.html Command to install a NuGet package, including any pre-release versions. ```powershell # Includes pre-releases Install-Package Krypton.Toolkit -Pre ``` -------------------------------- ### Install Latest Stable NuGet Package Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/VersionManagement.html Command to install the latest stable version of a NuGet package. ```powershell # Installs latest stable only Install-Package Krypton.Toolkit ``` -------------------------------- ### Build with Custom Target Example Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Contributing/Build%20System/BuildScripts.html Demonstrates how to specify a custom target (e.g., 'Pack') when running a build script. ```batch __ Copybuild-stable.cmd Pack # Sets targets=Pack build-stable.cmd # Uses default targets=Build ``` -------------------------------- ### Basic ToolTip Setup for Image Preview Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonPictureBox.html Sets up a KryptonPictureBox with an image and basic tooltip configuration including heading, details, and enabling SuperTip style. ```csharp public void SetupImagePreview() { var pictureBox = new KryptonPictureBox { SizeMode = PictureBoxSizeMode.Zoom, Image = LoadSampleImage() }; // Configure tooltip pictureBox.ToolTipValues.Heading = "Image Preview"; pictureBox.ToolTipValues.Description = GetImageDetails(); pictureBox.ToolTipValues.EnableToolTips = true; pictureBox.ToolTipValues.ToolTipStyle = LabelStyle.SuperTip; Controls.Add(pictureBox); } private string GetImageDetails() { var image = pictureBox.Image; if (image != null) { return $"Size: {image.Width}x{image.Height}\n" + $"Format: {GetImageFormat(image)}\n" + $"DPI: {GetHorizontalDpi(image):F1}x{GetVerticalDpi(image):F1}"; } return "No image loaded"; } ``` -------------------------------- ### Setup Basic Theme ComboBox Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Toolkit/Controls/KryptonThemeComboBox.html Demonstrates how to set up a basic KryptonThemeComboBox, dock it to fill its container, and set its drop-down style. It also includes an event handler for when the selected theme changes. ```csharp public void SetupBasicThemeComboBox() { var themeComboBox = new KryptonThemeComboBox { Dock = DockStyle.Fill, DropDownStyle = ComboBoxStyle.DropDownList }; // Handle theme selection themeComboBox.SelectedIndexChanged += OnThemeSelectionChanged; Controls.Add(themeComboBox); } private void OnThemeSelectionChanged(object? sender, EventArgs e) { if (sender is KryptonThemeComboBox comboBox) { // Theme selection is automatically handled by the control // The global palette will be updated automatically Console.WriteLine($"Selected theme: {comboBox.SelectedItem}"); } } ``` -------------------------------- ### Krypton Input Control Examples Source: https://krypton-suite.github.io/Standard-Toolkit-Online-Help/articles/Standard%20Toolkit/Ribbon/Components/BackStage%20View/KryptonRibbonBackstageViewCreatingPages.html Provides examples of common Krypton input controls: KryptonTextBox, KryptonComboBox, and KryptonCheckBox. ```vb.net __ Copy// Text box var nameTextBox = new KryptonTextBox { Width = 200, Height = 25 }; // Combo box var themeCombo = new KryptonComboBox { Width = 200, DropDownStyle = ComboBoxStyle.DropDownList }; themeCombo.Items.AddRange(new[] { "Office 2010", "Office 2013", "Microsoft 365" }); // Check box var autoSaveCheck = new KryptonCheckBox { Text = "Enable auto-save", AutoSize = true }; ```