Making markdown widget jump around less
This commit is contained in:
parent
e9d59d4fa2
commit
1f3b910615
3 changed files with 14 additions and 12 deletions
|
|
@ -40,6 +40,18 @@ namespace Markdig.Agg
|
|||
this.ScrollArea.VAnchor = VAnchor.Fit;
|
||||
}
|
||||
|
||||
var lastScroll = this.TopLeftOffset;
|
||||
this.ScrollPositionChanged += (s, e) =>
|
||||
{
|
||||
lastScroll = TopLeftOffset;
|
||||
};
|
||||
|
||||
// make sure as the scrolling area changes height we maintain our current scroll position
|
||||
this.ScrollArea.BoundsChanged += (s, e) =>
|
||||
{
|
||||
TopLeftOffset = lastScroll;
|
||||
};
|
||||
|
||||
contentPanel = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
||||
{
|
||||
HAnchor = HAnchor.Stretch,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue