WPF Positioning deals with placement of elements within a WPF application.
Questions tagged [wpf-positioning]
37 questions
2
votes
1 answer
Strange behavior during movement of UIElement. Why?
I'm having some trouble understanding (and fixing) a bug I'm experiencing.
I have the UI like in the following picture:
All of those areas colored in lightblue are Canvases and they are movable. This is where I have my problem. The one from the top…

Andrei
- 63
- 4
1
vote
2 answers
Position Labels on top of Image
I used a image in WPF. On top of the image I positioned labels. When resizing my window the image also resizes, which is ok. However the labels should also reposition. So they keep on the same relative position on top of the image. Currently I'm…

Marco
- 4,817
- 5
- 34
- 75
1
vote
1 answer
How can I position ViewModels in an ItemsControl
My mainwindow ViewModel has an ObservableCollection of ViewModels, called ViewModels.
The Mainwindow XAML has an ItemsControl with ItemsSource bound to ViewModels.
When I have
The Views…

GilShalit
- 6,175
- 9
- 47
- 68
1
vote
2 answers
How to calculate distance between popup control and Top of the screen in wpf?
We have using the WPF popup control.
We need to know that how to calculate the distance / height or Y coordinate of Popup control from the Top of the screen. So, how to calculate it ?
Please see attached image for the issue screenshot.
Image for…

pankaj
- 207
- 6
- 18
1
vote
0 answers
PopUp control does not move with the Window, while moving the window after we resize it
I am facing one issue with the WPF popup control.
When we resize the window and move it, PopUp control remains at same position at which it was open previously and does not move with the window.
So what is the solution for this issue.
please provide…

pankaj
- 207
- 6
- 18
1
vote
1 answer
How to position UserControl in the parent canvas
I want to place this UserControl at Canvas.Left="168", Canvas.Top="213".
However, the control appears at a corner. What should I do?
If I put the values at the point of usage for this class, the values are returned as NaN
In that case how can I get…

R.D
- 4,781
- 11
- 41
- 58
1
vote
0 answers
WPF - Draw tilted grid between two points
I'm writing a graph (nodes and links) designing program where the main designer allows users to shift nodes (represented as ellipses) about and to add links between the node.
The problem now is that I would like to add labels to the links. The…

Yiyuan Lee
- 659
- 8
- 23
1
vote
1 answer
How to add children of an ItemsControl where the children should decide their own position in Wpf?
I am using a wpf slider to display the time line in a video player. I need to add an ItemControl of some sort on top of this so that I can add buttons on the time line on certain positions in the time line (the buttons will hold their own position…

code-zoop
- 7,312
- 8
- 47
- 56
1
vote
1 answer
How to anchor a WPF Popup to a Control?
I have decided to use templated PopUps to display validation errors for my controls, rather than ToolTips (seem to offer greater flexibility in terms of styling). I am looking for a clean way to ensure that the PopUps are anchored to the control…

rupertmulrenan
- 355
- 1
- 3
- 13
1
vote
1 answer
Z order in between Image and InkPresenter
I have this CustomControl which contains an InkPresenter and an Image. The image has an AdornerDecorator as I plan to add an adorner to the image later on. I have set the Canvas.ZIndex of the Image to be higher than the InkPresenter so that the…

Nilu
- 245
- 1
- 4
- 17
0
votes
3 answers
how to absolute position a dialog view in WPF MVVM
So, i have all of my controls nicely laid out using grids and stack panels.
In some cases, i would like to show a dialog layer (to add preferences etc). It does not need to be modal, and it does not need to have transparent background.. i just need…

Sonic Soul
- 23,855
- 37
- 130
- 196
0
votes
1 answer
How to position WPF control next to the control with current focus?
I have a typical edit form (user control), with several input boxes.
I need a ListBox which must show right below the TextBox with current focus, so it needs to move dynamically.
I tried some binding, but nothing happens

Keith Jones
- 85
- 7
0
votes
1 answer
Positioning texblocks in control template
Im trying to make exclamation mark next to the text for validation exception.
There is my custom template there is my XAML:

Vinci
- 130
- 1
- 8
0
votes
2 answers
XAML- How to fix the position of an image relative to the right hand side of the display window?
I am developing an application for which the GUI is being written/ displayed using XAML. I have most of the desired elements displayed on the GUI at the moment, and am now working on the layout- positioning the various elements in particular…

Noble-Surfer
- 3,052
- 11
- 73
- 118
0
votes
1 answer
Prevent flickering when changing "Left" property in OnRenderSizeChanged
I have a main window where I want the "anchor" to be the right so that the window will expand to the left when the width changes. I did this by overriding the OnRenderSizeChanged event like so:
protected override void…

N7_2014
- 1
- 1