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 9028605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:01:35+00:00 2026-06-16T07:01:35+00:00

With some xaml like this: <Grid Name=grid> <AdornerDecorator> <TextBox Height=23 HorizontalAlignment=Left Name=textBox1 Width=120 />

  • 0

With some xaml like this:

<Grid Name="grid">
        <AdornerDecorator>
        <TextBox Height="23" HorizontalAlignment="Left" Name="textBox1" Width="120" />
        </AdornerDecorator>
</Grid>

The WPF Snoop utility indicates textBox1 is a child of AdornerDecorator (as you would expect) but also that the AdornerLayer that AdornerDecorator creates is also a child. As a custom adorner added to the AdornerLayer can be displayed ‘outside’ the textbox, the AdornerLayer’s drawing surface must stretch outside too (presumably all over the window).

So, what real significance does the placement of AdornerDecorator have (given we bind a UI element to the custom adorner, which we place in the AdornerLayer)? I know AdornerLayer.GetAdorner(textBox1) will get the first adorner layer in the visual tree up from textbox1, but what does it matter where that is (as the custom ardorner gets added to the layer and the custom ardoner knows which element it is bound to)?

  • 1 1 Answer
  • 0 Views
  • 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-06-16T07:01:37+00:00Added an answer on June 16, 2026 at 7:01 am

    The short answer is that it matters when you start to deal with controls that overlap other controls (in the z-index plane) and you care about whether or not a particular adorner layer shows on top of the overlapping controls. For example, when you use an ErrorTemplate, its contents get rendered in an adorner layer and if you don’t supply an <AdornerDecorator> in your app (meaning that you just use the one provided by most Window templates), then you can end up with this happening.

    By placing the <AdornerDecorator> where we want, we can control how this overlapping behaves.

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

Sidebar

Related Questions

I have defined grid in xaml like this: <Grid Name=grdMoney HorizontalAlignment=Center Margin=20> <Grid.ColumnDefinitions> <ColumnDefinition
This is the xaml of listview <ListView Grid.Column=1 Height=auto Name=ListView1 Width=auto AllowDrop =True >
My typical form with Grid look like this in XAML: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto></ColumnDefinition>
I have some XAML <ItemsControl Name=mItemsControl> <ItemsControl.ItemTemplate> <DataTemplate> <TextBox Text={Binding Mode=OneWay} KeyUp=TextBox_KeyUp/> </DataTemplate> </ItemsControl.ItemTemplate>
Im having some problems with binding in wpf/xaml. Have this simple file: <Window x:Class=test.Window1
I have a windows phone 7 app with some xaml that looks like: <Grid
I have some XAML like this drawing a scatterplot of a time series (X-Axis:
I have a grid with this template and styles in WPF/XAML: <Setter Property=TextOptions.TextFormattingMode Value=Display
I have found code like this for dynamically creating a Grid and some columns:
I need to create some xaml that shows text in columns like newspaper, something

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.