Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6720823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:15:26+00:00 2026-05-26T09:15:26+00:00

I have a Grid with a Adorner to provide some drawn pattern. See img:

  • 0

I have a Grid with a Adorner to provide some drawn pattern. See img: https://i.stack.imgur.com/HUJmh.jpg

My problem is that this Adorner(dots on the Grid) is layered on top of everything. The white square are draggable but now when the Adorner are on top, I can’t drag. I would like the layer to be behind every component added to the Grid. Any suggestions on how I can set the ZIndex?

Thanks.

Code below:

  MyAdorner ad = new MyAdorner(grid);
  AdornerLayer adLayer = AdornerLayer.GetAdornerLayer(grid);
  adLayer.Add(ad);

I push my Button and this is adding the MyAdorner to the grid. MyAdorner looks like this:

public MyAdorner(Grid adornedGrid)
: base(adornedGrid) {
Height = adornedGrid.Height;
Width = adornedGrid.Width;
brush = new VisualBrush();
brush.Stretch = Stretch.Fill;
brush.TileMode = TileMode.Tile;
brush.Viewport = new Rect(0, 0, SnapDistance, SnapDistance);
brush.ViewportUnits = BrushMappingMode.Absolute;
brush.Viewbox = new Rect(0, 0, SnapDistance, SnapDistance);
brush.ViewboxUnits = BrushMappingMode.Absolute;
ellipse = new Ellipse() { Fill = new SolidColorBrush(Colors.Blue), Width = 2, Height = 2 };
brush.Visual = ellipse;
}

protected override void OnRender(System.Windows.Media.DrawingContext drawingContext) { 
Pen renderPen = new Pen(new SolidColorBrush(Colors.Black), 0); 
drawingContext.DrawRectangle(brush, renderPen, new Rect(new Point(0, 0), AdornedElement.DesiredSize)); 
}
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:15:26+00:00Added an answer on May 26, 2026 at 9:15 am

    Is this what you’re looking for?

    Panel.SetZIndex(ad, 20)
    

    Attached properties of the framework are usually asignable from static methods of the UIElement that holds it.

    EDIT:
    Possible alternative: – make your own Panel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using vb.net code. I have grid view, please see the code below:
I have a grid view control in my application. Please see the below code.
I have Grid in wpf. When I do mouseover on rectangle, I can see
I have a grid that when some cell is clicked, it blinks (thanks to
I have grid with some pictures, I edit my picture and I save my
When I have Grid in Silverlight, and I provide Column Definitions like below <Grid.ColumnDefinitions>
I have grid with locked columns. I want to see summary feature there. grid
I have grid in my ASP.NET page (actualy it's Telerik RadGrid). There is GridButtonColumn
I have grid something like this: Ext.define('Exp.view.dashboard.Tv', { extend: 'Ext.grid.Panel', initComponent: function() { this.columns
I have grid of images, when the mouse is over any given image a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.