mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
fix: SelectableTextBlock
does not re-draw after Text
property changed (#906)
This commit is contained in:
parent
c8aecc00cc
commit
1c8d4d312a
2 changed files with 32 additions and 12 deletions
20
src/Views/EnhancedSelectableTextBlock.cs
Normal file
20
src/Views/EnhancedSelectableTextBlock.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
public class EnhancedSelectableTextBlock : SelectableTextBlock
|
||||
{
|
||||
protected override Type StyleKeyOverride => typeof(SelectableTextBlock);
|
||||
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
|
||||
if (change.Property == TextProperty)
|
||||
UpdateLayout();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue