Questions tagged [dockpanel]

Defines an area where you can arrange child elements either horizontally or vertically, relative to each other.

Defines an area where you can arrange child elements either horizontally or vertically, relative to each other.

224 questions
0
votes
1 answer

Keeping WPF grids from getting out of parent bounds

In my UI, I have a big grid with two columns and one row. in the right column, I have a grid with three rows where in the top row I have a user control, and in the two bottom rows I have two Expander objects, each containing an ItemsControl with a…
Jonathan Perry
  • 2,953
  • 2
  • 44
  • 51
0
votes
1 answer

WPF: Expanders stacked on top of each other where one should be expanded and take all remaining space

I think this is pretty known control but I couldn't find an WPF example/blog on the web. What I need is collection of Expander WPF controls stacked on top of each other just like in StackPanel. Difference though is that Expanders should be collapsed…
matori82
  • 3,669
  • 9
  • 42
  • 64
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
-1
votes
1 answer

Top Dock in a DockPanel is taking all the space

My code looks something like this:
Jtastic
  • 7
  • 5
-1
votes
1 answer

Prevent elements in the DockPanel from expanding

I have the following code where I want to prevent the first two buttons from expanding when the Expander is opened:
-1
votes
1 answer

DockPanel resize objects inside

I want to make my objects in DockPanel expand automatically when the window is resized, currently they only change their position. My XAML:
Jorr1
  • 11
  • 6
-1
votes
2 answers

Add a Textblock inside a border with nested StackPanels, in code

I am trying to modify a TextBlock from a WPF code. I have the following MainWindow XAML :
BOUHL R.
  • 31
  • 4
-1
votes
1 answer

How to get sole DockPanel child element to dock on the top

Below I say "DockPanel.Top" on Menu but it docks in the middle. (?) If I take the Height attribute out of Menu it docks on top but is about 200px high. (?) I thought that was what LastChildFill was for. How can I get this child element of DockPanel…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
-1
votes
1 answer

How to get text-alignment and stretch in the dockpanel correct?

In a xaml DataTemplate I have
-1
votes
1 answer

IsMouseOver trigger for DockPanel not firing unless children are hovered over

This question has been asked a couple of times before, but at this time, none of the answers I've found turned out to be working. So I have a custom DockPanel with 2 child elements inside, 1 TextBox and 1 Image. I intended to have the DockPanel…
ForWiz
  • 145
  • 1
  • 1
  • 10
-1
votes
2 answers

WPF TextBox will not fill if DockPanel.LastChildFill=true

Why won't my TextBox fill the available space in its DockPanel parent? I expected it to stretch to fill the remaining horizontal space. The Button is attached to the right nicely. I've got this at the top of my Window:
Bob Peterson
  • 636
  • 7
  • 16
-1
votes
1 answer

How to add TextBlock text value from database object value

I'm working on WPF application which has one Window.xaml where I'm using dataGrid which is filled from Database (MSSQL 2008R2), In that dataGrid I'm loading orders from my Database. I'm also grouping my orders by numberOfOrder, and its possible to…
Roxy'Pro
  • 4,216
  • 9
  • 40
  • 102
-1
votes
1 answer

How to remove an item from DockPanel so that it update its view

public void CreateLayout(Grid gridLayout) { //StackPanel DwrapperForControls = new StackPanel(); DwrapperForControls.Width = 300; DwrapperForControls.Margin = new Thickness(10, 0, 0, 0); //TextBlock…
-2
votes
1 answer

Stretch Usercontrol in Dockpanel

I'm new at WPF. I know from Forms that i can add usercontrols to a panel. How can I do this in WPF? I tried a Grid, DockPanel and StackPanel but I don't know how can I stretch my usercontrol? In this Grid oder what else will only be this…
Lyror
  • 924
  • 3
  • 10
  • 19
1 2 3
14
15