Occurs when the current selection is changed.

Namespace:  C1.Win.XmlEditor
Assembly:  C1.Win.XmlEditor.2 (in C1.Win.XmlEditor.2.dll)

Syntax

C#
public event EventHandler SelectionChanged
Visual Basic (Declaration)
Public Event SelectionChanged As EventHandler

Examples

This example shows how to add an "Add Image" button to the form.
Copy CodeC#
privatevoid Form1_Load(object sender, EventArgs e)
{
   _btnAddImage = new Button();
   _btnAddImage.Text = "Add Image";
   _btnAddImage.Click += AddPictureDialog;
   this.Controls.Add(_btnAddImage);

   _btnAddImage.Location = new Point(10, 10);

   c1XmlEditor1.DocumentChanged += UpdateUI;
   c1XmlEditor1.SelectionChanged += UpdateUI;
   c1XmlEditor1.ModeChanged += UpdateUI;
}

privatevoid AddPictureDialog(object sender, EventArgs e)
{
   c1XmlEditor1.ShowDialog(DialogType.Image);
}

privatevoid UpdateUI(object sender, EventArgs e)
{
   _btnAddImage.Enabled = c1XmlEditor1.CanShowDialog(DialogType.Image);
}

See Also