Skip to content
Discussion options

You must be logged in to vote

Found a solution and came back here :-)

Based on this Stack Overflow answer for AvalonEdit.

1) Add a Flyout in your TextEditor (View, XAML)

<AvaloniaEdit:TextEditor
    x:Name="myTextEditor"
    Grid.Column="0"
    Grid.Row="1"
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch"
    Margin="12,12,12,0"
    IsReadOnly="False"
    Document="{Binding MyTextDocument, Mode=TwoWay}">
  <FlyoutBase.AttachedFlyout>
    <Flyout ShowMode="TransientWithDismissOnPointerMoveAway">
      <SelectableTextBlock x:Name="stbPopupText"/>
    </Flyout>
  </FlyoutBase.AttachedFlyout>
</AvaloniaEdit:TextEditor>

2) Add code-behind for text editor (View, C#)

var textEditor = this.FindControl<TextEditor

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexandrehtrb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant