Property SelectedWatch
SelectedWatch
Gets a currently selected watch expression.
public string SelectedWatch { get; }
Property Value
Examples
Here is how to use a SelectedWatch in the C# code:
using System;
using System.Windows;
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI.Wpf;
public partial class MainWindow : Window
{
private Watches watchesControl;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var debugger = new ScriptDebugger();
var watchesControl = new Watches();
watchesControl.Debugger = debugger;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show(watchesControl.SelectedWatch);
}
}
Here is how to use a SelectedWatch in the Visual Basic code:
Imports System
Imports System.Windows
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI.Wpf
Partial Public Class MainWindow
Inherits Window
Private watchesControl As Watches
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim debugger = New ScriptDebugger()
Dim watchesControl = New Watches()
watchesControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
MessageBox.Show(watchesControl.SelectedWatch)
End Sub
End Class
Remarks
The SelectedWatch property can be changed by clicking on the appropriate watch in the variable\expression list displayed by this control.