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}" /> |
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! |
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!