Questions tagged [stackpanel]

A WPF component for displaying a list of elements in a horizontal or vertical stack.

629 questions
0
votes
1 answer

Binding to ancestor StackPanel DockPanel.Dock

I have a StackPanel that can be docked to the Left or Right inside of a DockPanel. The items in the StackPanel should dock to the same side like the ancestor does. For Testing i get the Name of the ancestor in Visual Tree but i have no idea how to…
LaWi
  • 71
  • 1
  • 1
  • 6
0
votes
1 answer

Setting the contents of a ScrollViewer to that of another ScrollViewer (using C# on Windows Phone)

I'm stuck with a problem I can't seem to get around... I need to set the contents of a ScrollViewer to that of another (which contains a StackPanel, which contains images and text). I have tried the following approaches and I keep getting an error…
0
votes
1 answer

How can I get a StackPanel to be only as wide as its content?

The following template shows dynamic information in a colored box. However, the box is always the full width of the DockPanel/screen. I could put a fixed Width in the Border element, but then a very long customer name might get cut off. How can I…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
-1
votes
1 answer

Stackpanel inside a rectangle

Is it possible to add a stackpanel inside a rectangle. I need a custom wpf window that has rounded corners. Best way to achieve it for me was to add a rectangle content into a window and make window's background transparent. Now I need two…
bilgestackoverflow
  • 329
  • 1
  • 6
  • 24
-1
votes
1 answer

Some Properties are not binding when used in ItemsControl

I have an ItemsControl element that populates a Stackpanel. Its bound to a ObservableCollections full of "LedModel" objects (see below). I cannot get the binding for Brush, Size and BlurRadius to work. Oddly enough however the binding for the Label…
JakobSailer
  • 15
  • 1
  • 4
-1
votes
1 answer

StackPanel in ComboBox to ListBoxItem

I am making a WPF application for school, and I need to get the content of the ComboBoxItem to the ListBox. I did this with just a regular TextBlock in a ComboBoxItem, but I need to add a button to it to be able to delete that item in the ListBox,…
Riload
  • 1
  • 1
-1
votes
1 answer

Evenly space StackPanel children to fill remaining space

I have a StackPanel in WPF that contains Labels and TextBoxes, the StackPanel's orientation is Vertical. I'm looking to have the children spaced evenly amongst the remaining height of the StackPanel, or maybe some dynamic padding or something…
Zac1989
  • 53
  • 10
-1
votes
2 answers

How to drag a stackpanel (not drag-drop) like dragging a application window in windows

I am making a uwp App, which is a widgets app, and if the user wants to reposition the widgets, (each widget is a stackpanel with content), the stackpanel should move according to the mouse, just like dragging an application window in windows,…
-1
votes
1 answer

Reproduce CSS property in StackPanels : Space Between

Is it possible in XAML to automatically separate elements in a StackPanel no matter what the size of the window is? In CSS with the property : space between you can send elements to both sides of the parent. This is what I want to reproduce. Is it…
-1
votes
1 answer

C# TreeView Visibilty Collapsed still leaving white space

I am testing a WPF app with a TreeView that contains StackPanels with TreeViewItems. The StackPanel Visibility is bound to the code-behind. When I test "Collapsed", the StackPanel containing the TreeViewItem disappears, but the white space is left…
-1
votes
1 answer

How to add an "add" button that sticks at the end of a listbox?

I've been looking almost all night for a way to have this nice "add" button at the bottom of a ListBox. The thing is I want it to stick at the bottom of the listbox, and then once the bottom of the border is reached, I want the listbox to become…
Marcel Barc
  • 137
  • 1
  • 9
-1
votes
2 answers

StackPanel in MFC

I was frustrated because I know StackPanel wasn't in the MFC. I'm making a UI, and I have to stack the controls vertically. If i'm using WPF, I can use StackPanel, but I'd like to ask you some advice on how to do it in MFC. thnk you very much
dhlee
  • 11
  • 2
-1
votes
1 answer

Z-Index alike property for StackPanel children?

I have a StackPanel that has two Items: ToggleButton and ListBox. To make the listBox looks like it's a part of the toggle button -by hiding the sharp edges I'm thinking to give it negative margin so it moves upward, but this presumes that it's…
mshwf
  • 7,009
  • 12
  • 59
  • 133
-1
votes
2 answers

How to override data context in stack panel?

How to override the first inner stack panel's data context...So that..I can refer the properties in class A Class A { public B b; } Class B { } // HEre…
Relativity
  • 6,690
  • 22
  • 78
  • 128
-1
votes
1 answer

Sorting Dynamic User controls in Stackpanel

I have a User Control which have multiple labels containing values, such as a date for Uploaded, a string for Title, a string for Author, ect. As of right now I'm populating the stackpanel by creating a new instance of the user control for each row…
Trinax
  • 31
  • 3
1 2 3
41
42