Xceed Grid for WinForms v4.3 Documentation
Welcome to Xceed Grid for WinForms v4.3 / Sample applications / CustomControls Sample Application (Editor Controls)
In This Topic
    CustomControls Sample Application (Editor Controls)
    In This Topic

    Programming languages

    VB.NET, C#

    Overview

    This sample explorer allows you to browse through various custom editors and view the code that was required to create them.

    These samples demonstrate how to:

    Custom Calendar

    • Derive from the WinCalendar class 

    • Override the DefaultShowPreviewDays property to prevent, by default, preview days from being displayed in the calendar months. 

    • Override the OnPaintDayBackground method to paint an image in the background of specific days. 

    • Override the OnPaintDay method to (optionally) paint the text of the day.

    Custom DatePicker

    • This class demonstrates how to create a custom UserControl which shows the WinDatePicker control using a WinCheckBox control to choose a null date.

    Optional TextBox

    • Create a custom UserControl which allows text to be entered in a WinTextBox control only when the WinCheckBox control contained in the WinTextBox control is enabled. 

    • Handle the CheckChanged and Click events of the WinCheckBox control.

    Option Picker

    PictureViewer - ISupportIntegralResizing Interface Implementation

    • Create a custom UserControl which implements the ISupportIntegralResizing interface. The ISupportIntegralResizing interface implementation allows for the DropDownControl to be resized picture by picture rather than pixel by pixel.

    Scrolling TextBox

    • Create a custom UserControl which allows text to be entered and scrolled through using the embedded WinButton controls.

    Spin Edit

    • Create a custom UserControl which mimics the NumericUpDown control using a WinTextBox control which contains 2 WinButton controls.

    Customized WinComboBox DropDown Control

    • Customize the WinComboBox control's dropdown control (Xceed.Grid.GridControl) to allow grouping and sorting.

    How to use

    Select a sample to view in the list box on the left-hand side. The sample will be created and can be viewed in the "Sample" tab on the right-hand side. The sample's code can be viewed (but not edited) in the "Code" tab. Whenever a sample is selected, a short description will appear in the text box.

    Project location & filename

    C#: Xceed Samples\Xceed Editors for WinForms v#.#\CSharp\CustomControls\CustomControls.csproj

    VB.NET: Xceed Samples\Xceed Editors for WinForms v#.#\Visual Basic .NET\CustomControls\CustomControls.vbproj