AdornmentLayerDefinitions OrderPlacement

SyntaxEditor for WPF Forum

Posted 12 years ago by Mick George - Senior Software Engineer, CNC Software, LLC
Version: 12.1.0562
Avatar

Hi,

I have a SyncAdornmentManager class that essentially controls drawing of  a box in a document and a connecting line between two documents as shown in the image I emailed as I dont see a way to attach an image to this post. I am seeing an issue with the highlight current line property that when enabled is obscuring a box adornment when that line has focus and is highlighted, you can see this in the image. I draw the adorners on the mouse enter event and remove it on the mouse leave event.

 

Below is the code I have that sets up the ordering of the adorner, my question is, do we need a new order placement property that reflects the current line highlighter or is there something additional I need to do?

 

Thanks

 

/// <summary>
    /// Represents an adornment manager for a view that makes a custom decorator under text.
    /// </summary>
    public class SyncAdornmentManager : DecorationAdornmentManagerBase<IEditorView, SyncTag>
    {
        /// <summary>
        /// AdornmentLayerDefinition declaration
        /// </summary>
        private static AdornmentLayerDefinition layerDefinition = new AdornmentLayerDefinition("Sync",
                                                                  new Ordering[] { 
                                                                  new Ordering(AdornmentLayerDefinitions.Highlight.Key, OrderPlacement.After),
                                                                  new Ordering(AdornmentLayerDefinitions.TextBackground.Key, OrderPlacement.After),                                                                  
                                                                  new Ordering(AdornmentLayerDefinitions.Selection.Key, OrderPlacement.After),
                                                                  new Ordering(AdornmentLayerDefinitions.CollapsedRegion.Key, OrderPlacement.After),
                                                                  new Ordering(AdornmentLayerDefinitions.Squiggle.Key, OrderPlacement.After),
                                                                  new Ordering(AdornmentLayerDefinitions.TextForeground.Key, OrderPlacement.After),
                                                                  new Ordering(AdornmentLayerDefinitions.Caret.Key, OrderPlacement.After)
                                                                  });

Comments (4)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mick,

The current line highlighter uses AdornmentLayerDefinitions.Highlight so I think you are ok as is.  It looks good in your screenshot.


Actipro Software Support

Posted 12 years ago by Mick George - Senior Software Engineer, CNC Software, LLC
Avatar

Hi,

Thanks for your reply but I think you may have misunderstoon my question :)

What I am trying to do is have the box adorner overlay the selected line so it shows just like the top image but as it is now the highlighted line obscures the box.

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mick,

Hmm, I'm not sure.  Can you make a minimal sample project that repro's it so we can take a look and e-mail that to our support address in the ticket you sent before?  Please rename the .zip file extension so it doesn't get spam blocked.


Actipro Software Support

Posted 12 years ago by Mick George - Senior Software Engineer, CNC Software, LLC
Avatar

I continue to see a number of places where the current line highlighting obsures (overlays) my custom adorners, I will try to get a sample project to you soon.

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.