Beispiel #1
0
        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();
        }
Beispiel #2
0
 public void ResetSelection()
 {
     Content.SelectionStart = null;
     Content.SelectionEnd   = null;
     SelectionLayer.ResetSelection();
 }