Editor for WinForms | ComponentOne
C1.Win.C1Editor.4.5.2 Assembly / C1.Win.C1Editor.UICustomization Namespace / XHTMLImageItem Class
Members Example

In This Topic
    XHTMLImageItem Class
    In This Topic
    Provides data to bind to and use in a custom Image edit dialog.
    Object Model
    XHTMLImageItem Class
    Syntax
    'Declaration
     
    Public Class XHTMLImageItem 
       Inherits XHTMLItemBase
    public class XHTMLImageItem : XHTMLItemBase 
    Remarks

    Implementing a custom Image dialog, you will receive an instance of the XHTMLCellItem class in the IImageItemDialog.BindData method. Use it to bind the data to the dialog's UI.

    Example
    The code below binds data in the XHTMLImageItem item to GUI controls of a custom dialog form.
    void IImageItemDialog.BindData(XHTMLImageItem Item)
    {
        _cbxWidthType.SelectedIndex = (int)Item.WidthType;
        _cbxHeightType.SelectedIndex = (int)Item.HeightType;
        _tbWidthValue.Value = Math.Max(Item.WidthValue, 1);
        _tbHeightValue.Value = Math.Max(Item.HeightValue, 1);
        _tbSource.DataBindings.Add("Text", Item, "Source");
        _chkWidth.DataBindings.Add("Checked", Item, "UseWidth");
        _chkHeight.DataBindings.Add("Checked", Item, "UseHeight");
        _tbAlternate.DataBindings.Add("Text", Item, "Alternate");
    }
    Inheritance Hierarchy

    System.Object
       C1.Win.C1Editor.UICustomization.XHTMLItemBase
          C1.Win.C1Editor.UICustomization.XHTMLImageItem

    See Also