xtd.forms examples

August 19, 2025 ยท View on GitHub

This folder contains xtd.forms examples used by Reference Guide and more.

xtd_forms

Hello Worlds

Application

Dialogs

  • about_box represents a dialog box that displays about box.
  • about_dialog represents a dialog box that displays about dialog.
  • assert_box represents a dialog box that displays assert box.
  • assert_dialog represents a dialog box that displays assert dialog.
  • busy_box represents a busy box that displays busy box.
  • busy_dialog represents a busy box that displays busy dialog.
  • color_box represents a dialog box that displays available colors along with controls that enable the user to define custom colors.
  • color_dialog represents a dialog box that displays available colors along with controls that enable the user to define custom colors.
  • debug_message_box represents a debug message box that displays debug message box and write debug message.
  • debug_message_dialog represents a debug message dialog that displays debug message dialog and write debug message.
  • exception_box represents a exception box that displays exception box.
  • exception_dialog represents a exception box that displays exception box.
  • find_box represents a find dialog box.
  • find_dialog represents a find dialog box.
  • folder_browser_box prompts the user to select a folder.
  • folder_browser_dialog prompts the user to select a folder.
  • font_box represents a dialog box that displays a font box to the user to choose a font from among those installed on the local computer.
  • font_dialog prompts the user to choose a font from among those installed on the local computer.
  • input_box prompts the user to input text.
  • input_dialog prompts the user to input text.
  • message_box displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A MessageBox can contain text, buttons, and symbols that inform and instruct the user.
  • message_dialog displays a message window, also known as a dialog box, which presents a message to the user. It is a modal window, blocking other actions in the application until the user closes it. A MessageBox can contain text, buttons, and symbols that inform and instruct the user.
  • open_file_box displays a file select window, also known as a file dialog, which asks the user to select a single or multiple files. It is a modal window, blocking other actions in the application until the user closes it.
  • open_file_dialog displays a standard dialog box that prompts the user to open a file.
  • progress_box displays a progress dialog window, which shows to user a progress animation, with more details like the remaining time, estimated time and other options which can be customized with xtd::forms::progress_box_options. It is a modal window, blocking other actions in the application until the user cancels or hides it.
  • progress_dialog represents a progress box that displays progress box.
  • replace_box represents a replace dialog box.
  • replace_dialog represents a replace dialog box.
  • save_file_box displays a file save window, also known as a file dialog, which asks the user to select a path to save a single file to. It is a modal window, blocking other actions in the application until the user closes it.
  • save_file_dialog prompts the user to select a location for saving a file.
  • trace_message_box represents a trace message box that displays trace message box and write trace message.
  • trace_message_dialog represents a trace message dialog that displays trace message dialog and write trace message.

Forms

  • debug_form represents a form that trace all written debug with xtd::diagnostics::debug class.
  • dialog demonstrates the use of xtd::forms::form container as dialog.
  • form represents a window or dialog box that makes up an application's user interface.
  • popup_form demonstrates the use of xtd::forms::form container as popup form.
  • trace_form represents a form that trace all written trace with xtd::diagnostics::trace class.
  • context_menu represents a shortcut menu.
  • context_menu_strip represents a shortcut menu.
  • main_menu represents a main menu system for a form.
  • menu_strip represents a menu system for a form.
  • status_bar represents a Windows status bar control.
  • status_strip represents a Windows status bar control.
  • tool_bar represents a tool bar for a form.
  • tool_strip represents a container for Windows toolbar objects.
  • tool_strip_container represents panels on each side of the form and a central panel that can hold one or more controls.

Containers

  • flow_layout_panel represents a panel that dynamically lays out its contents horizontally or vertically.
  • collapsible_panel used to group collections of controls in a collapsible container.
  • group_box represents a Windows control that displays a frame around a group of controls with an optional caption.
  • horizontal_layout_panel used to group collections of horizontal aligned controls.
  • panel demonstrates the use of xtd::forms::panel container.
  • popup_panel demonstrates the use of xtd::forms::popup_panel container.
  • split_container represents a control consisting of a movable bar that divides a container's display area into two resizable panels.
  • tab_control manages a related set of tab pages.
  • table_layout_panel represents a panel that dynamically lays out its contents in a grid composed of rows and columns.
  • vertical_layout_panel used to group collections of horizontal aligned controls.

Controls

Components

Datas

  • binding_navigator represents the navigation and manipulation user interface (UI) for controls on a form that are bound to data.
  • binding_source encapsulates the data source for a form.
  • chart
  • data_grid_view displays data in a customizable grid.
  • data_set

Printing

  • page_setup_dialog enables users to change page-related print settings, including margins and paper orientation. This class cannot be inherited.
  • print_dialog lets users select a printer and choose which sections of the document to print from a Windows Forms application.
  • print_document defines a reusable object that sends output to a printer, when printing from a Windows Forms application.
  • print_preview_control represents the raw preview part of print previewing from a Windows Forms application, without any dialog boxes or buttons. Most PrintPreviewControl objects are found on PrintPreviewDialog objects, but they do not have to be.
  • print_preview_dialog represents a dialog box form that contains a PrintPreviewControl for printing from a Windows Forms application.

Themes

Events

User Forms

User Dialogs

User Controls

Drawing

Games

  • game_of_life The Game of Life is not your typical computer game. It is a 'cellular automaton', and was invented by Cambridge mathematician John Conway.
  • minesweeper The goal of the game is to uncover all the squares that do not contain mines.
  • tetris The Tetris game is one of the most popular computer games ever created.

Others

Build and run any project

Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:

xtdc run -t any_project_name