Occurs when any change has happened in the document.
Namespace:
C1.Win.XmlEditorAssembly: C1.Win.XmlEditor.2 (in C1.Win.XmlEditor.2.dll)
Syntax
| C# |
|---|
public event EventHandler DocumentChanged |
| Visual Basic (Declaration) |
|---|
Public Event DocumentChanged As EventHandler |
Remarks
Handle this event to provide the processing that your application requires when changes occur in the edited document.
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); } |