public FragmentView() { WheelScrollLines = SystemParameters.WheelScrollLines; UpdateCursor(); BackgroundLayer = new FragmentLayer(this); SelectionLayer = new SelectionLayer(this); TextLayer = new FragmentLayer(this); Layers.Add(BackgroundLayer); Layers.Add(SelectionLayer); Layers.Add(TextLayer); ScrollTransform.Changed += (s, e) => UpdateMousePosition(null);; foreach (var layer in Layers) { AddVisualChild(layer.Container); AddLogicalChild(layer.Container); } CreateContent(); }
public void ResetSelection() { Content.SelectionStart = null; Content.SelectionEnd = null; SelectionLayer.ResetSelection(); }