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 Locals localsControl;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var debugger = new ScriptDebugger();
localsControl = new Locals();
localsControl.Debugger = debugger;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show(localsControl.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 localsControl As Locals
Private Sub Window_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim debugger = New ScriptDebugger()
localsControl = New Locals()
localsControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
MessageBox.Show(localsControl.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.