Skip to main content
A newer version of this page is available. .
Bar

BarStaticItemLink Class

Represents a link to a BarStaticItem object.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v18.2.dll

Declaration

Remarks

See Items and Links to learn more.

Example

This example shows how to create BarStaticItem items, used to display static text within bars.

The following image shows the result:

E1579

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Navigation
Imports System.Windows.Shapes

Namespace BarStaticItemEx
    ''' <summary>
    ''' Interaction logic for Window1.xaml
    ''' </summary>
    Partial Public Class Window1
        Inherits Window

        Public Sub New()
            InitializeComponent()
            AddHandler rtfEditor.SelectionChanged, AddressOf rtfEditor_SelectionChanged
        End Sub

        Private Sub rtfEditor_SelectionChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
            Dim line As Integer = 0
            Dim col As Integer = 0
            rtfEditor.CaretPosition.GetLineStartPosition(-100000, line)
            col = rtfEditor.CaretPosition.GetOffsetToPosition(rtfEditor.CaretPosition.GetLineStartPosition(0))
            staticItemLine.Content = "Line: " & (-line).ToString() & "  Position: " & (-col).ToString()
        End Sub
    End Class
End Namespace

The following code snippets (auto-collected from DevExpress Examples) contain references to the BarStaticItemLink class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

See Also