A WPF component for displaying a list of elements in a horizontal or vertical stack.
Questions tagged [stackpanel]
629 questions
0
votes
2 answers
How to implement a Panel internally using other panels?
For example, implement a TwoColumnStackPanel. As the name suggests, the general StackPanel can only stack elements in one column, while my TwoColumnStackPanel can stack elements in two columns.
The TwoColumnStackPanel should distribute elements…

Gqqnbig
- 5,845
- 10
- 45
- 86
0
votes
1 answer
WPF Nested Databinding
I'm trying to bind data into nested StackPanels in WPF using the following code - to no avail. Can anybody spot where I'm going wrong?

Leigh
- 1,495
- 2
- 20
- 42
0
votes
1 answer
WPF window stretching incorrectly/weird behavior
I've had a weird behavior in WPF for awhile now, and I haven't been able to trace down where the problem is. In a nutshell, when I resize the window from the bottom or right, everything works as expected. But if I happen to grab it from the top or…

Keven M
- 972
- 17
- 47
0
votes
1 answer
Stretching of WPF StackPanel
I'm playing around with WPF and I'm trying to create an ImageButton control. I've created a UserControl as follows:

woodstock
- 85
- 2
- 13
0
votes
2 answers
StackPanel with huge amount of children
i'm building a wpf control based on the outlook calender sample in code project,
first of all i wanna know if this is a good sample or that this is not the way of writing controls?
second, i need to support milliseconds view of the calender, the…

Chen Kinnrot
- 20,609
- 17
- 79
- 141
0
votes
2 answers
Add Expansion Button to Stackpanel
I'd like to add Elements to a StackPanel (or Listbox / Listview if it would make that easier) and automatically add a Button (like "...") to indicate that there are more children than there is space for.
Consider a calendar that has appointment…

scientist
- 1
- 2
0
votes
2 answers
How to anchor a wpf data grid which is inside a stack panel a fixed distance from the main window's four corners
I have the following wpf layout given to me by my employer. It makes use of multiple nested stack panels.
I'm trying to anchor a data grid which is inside a stack panel a fixed distance away from the main window's four corners. And whenever the grid…

yohannist
- 4,166
- 3
- 35
- 58
0
votes
2 answers
Why this Binding doesn't work properly even it gets value from source?
I have this own class :
public class PeriodContainerPanel:StackPanel
{
public PeriodContainerPanel()
: base()
{
addCollectionsToStackPanel();
}
private void addCollectionsToStackPanel()
{
…

Javidan
- 566
- 1
- 9
- 25
0
votes
0 answers
Why does inline instantiation and addition of UserControl to StackPanel overwrite existing content?
If I create instances of my UserControls, and then add them to the StackPanel like follows:
var myUC1 = new MyUserControl(GetControlData());
var myUC2 = new…

DaveDev
- 41,155
- 72
- 223
- 385
0
votes
1 answer
wpf controls traveling around the grid/stack panel and not staying put
I am building a user control in WPF and put a few buttons in a stackpanel laying inside a grid. Problem is that when I build the app and run it, the buttons "sail around" and don't stay where I put them in the designer window. Is there any attribute…

jonatr
- 370
- 1
- 7
- 19
0
votes
2 answers
0
votes
3 answers
How can I create a Mouse Hover State on Silverlight for a Stack Panel?
I am trying to create a mouse hover state which it changes its opacity when a mouse is over the stack panel.
I have created the state, and created a mouse_enter event for the stack panel, and on the code behind cs file, I have the following code on…

PlayKid
- 1,345
- 5
- 20
- 33
0
votes
2 answers
How to provide a close functionality to delete an item from StackPanel?
I have a UserControl which I need to keep adding to a StackPanel during runtime (per User's action). I want a close button (a small 'x') on the right side top corner for each item in StackPanel.
I could do this: add my UserControl to some Panel…

Shankar Raju
- 4,356
- 6
- 33
- 52
0
votes
1 answer
How to handle removal of a related group of WPF UI Elements
I'm interested in what is the best way to implement the removal of related set of UI elements.
This is what I'm working on: I have a Grid embedded within a verticle Scrollviewer. The user can add multiple Listboxes to this Grid during runtime via a…

Jake Shakesworth
- 3,335
- 4
- 29
- 43