How to set TextEditor.TextArea.XxxProperty in xaml? #274
-
How to do like this: <avalonEdit:TextEditor TextArea.SelectionBrush="{Binding xxx}"
TextArea.TextView.CurrentLineBackground="{Binding xxx}" /> |
Beta Was this translation helpful? Give feedback.
Answered by
siegfriedpammer
Apr 17, 2021
Replies: 1 comment 1 reply
-
These properties are not attached properties, thus cannot be set inline like you want to do it. However, you can use a style to set these properties: <Style TargetType="avalonEdit:TextArea">
<Setter Property="SelectionBrush">
<Setter.Value>
<SolidColorBrush Color="Red" Opacity="0.7" />
</Setter.Value>
</Setter>
</Style>
<Style TargetType="avalonEdit:TextView">
<Setter Property="CurrentLineBackground">
<Setter.Value>
<SolidColorBrush Color="Green" Opacity="0.7" />
</Setter.Value>
</Setter>
</Style> Hope this helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
GF-Huang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These properties are not attached properties, thus cannot be set inline like you want to do it. However, you can use a style to set these properties:
Hope this helps!