Table of Contents

Property SelectedText

Namespace
Alternet.Scripter.Debugger.UI.Wpf
Assembly
Alternet.Scripter.Debugger.UI.Wpf.v9.dll

SelectedText

Gets a currently selected text.

public string SelectedText { get; }

Property Value

string

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.SelectedText);
    }
}

Here is how to use a SelectedText 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.SelectedText)
    End Sub
End Class

Remarks

The SelectedText property can be changed by clicking on the appropriate watch in the variable\expression list displayed by this control.