Questions tagged [wpf-grid]

A wpfgrid is a WPF Panel which arranges child elements in predefined columns and rows.

Full class name: System.Windows.Controls.Grid. Grid defines a flexible grid area that consists of columns (ColumnDefinitions) and rows (RowDefinitions). Child elements are positioned using attached properties Grid.Column and Grid.Row and can take more than one column/row if attached dependency properties Grid.ColumnSpan/Grid.RowSpan are set.

56 questions
1
vote
1 answer

Grid in Grid not showing Scrollbar in C# WPF

I have a Grid in another Grid and add the second Grid into ScrollViewer but don't see scrollbar for it. The grid i add ScrollViewer has the name InfoGrid. I dont understand why ScrollViewer is not working. Is there any alternative way you can…
nihasmata
  • 652
  • 1
  • 8
  • 28
1
vote
2 answers

How to dynamically create and modify a new Grid row elements?

I'm just starting a new WPF app. I have a grid and want to create the rows dynamically (pressing a button for example) and then create TextView/ProgressBar inside this row. I already searched how to create the gridrows programatically. But in every…
Ben
  • 55
  • 1
  • 6
1
vote
1 answer

Grid with round corners

Is there a better option to make a grid with rounded corners? Might this cause any problems? (Example: Wanted is a corner-radius of 10 & background colour of #FF292A2E)
GionSnow
  • 117
  • 1
  • 10
1
vote
1 answer

WPF ScrollViewer with Grid rendering incorrectly

Take this simplistic code:
Marko
  • 2,266
  • 4
  • 27
  • 48
1
vote
0 answers

Grid with three rows, one is collapsable (DataGrid, GridSplitter, TextBox). Grid is not resizing as I would like

I have a problem with my Grid layout. I would like to have three rows (second with GridSplitter) with behavior: If the row with TextBox is Collapsed, then DataGrid fill whole space. If the row with TextBox is Visible, then TextBox and DataGrid share…
senfen
  • 877
  • 5
  • 21
1
vote
1 answer
1
vote
1 answer

WPF grid visibility on button click

I have a WPF application. If I write only grid hide show on button click then it is working. But if I write any code below that, it is not working.
nirav
  • 29
  • 4
1
vote
1 answer

ColumnDefinition position in the Grid

I'm trying to figure out if a ColumnDefinition knows it's position inside the Grid or not. I have 3 columns as follows:
1
vote
2 answers

WPF Grid Layout query

In a WPF Project I have a Grid defined with two rows each containing a ListBox. The RowDefinitions have their Height = '*' so equal space is allocated to each ListBox. What I would like to happen however, is that when either ListBox is not fully…
Cleve
  • 1,273
  • 1
  • 13
  • 26
0
votes
0 answers

How to make label resize along with the whole window in WPF Grid?

I have a XAML design and want all the controllers resize themselves when user manually resize the window. All the controllers are textbox and combobox. Now When I resize the window, the label got partial hidden. Here is the XAML:
BabyHai
  • 89
  • 1
  • 9
0
votes
0 answers
0
votes
1 answer

Why cannot I stretch items horizontally when using GridSplitter?

I have a Grid with two GridSplitters:
Spook
  • 25,318
  • 18
  • 90
  • 167
0
votes
2 answers

Put a WPF button just after a label

I have an WPF usercontrol which contains following grid.
Willy
  • 9,848
  • 22
  • 141
  • 284
0
votes
1 answer

Width problem with * (star) in WPF Grid - ColumnDefinition

I have tried ColumnDefinition Width="5*" and also with 3*, 1* to ColumnDefinition which aplied to Grid container and the parent control is ListBox but it does not reflect the expected width. refer XAML code as below
0
votes
0 answers

WPF inner Grid does not scale up as it should have

I am haveing trouble scaling part of my inner grid to a specific size. The thing is, what I want to do, is create a border around a place, where I will later insert image in. I want my app to be scalable, but currently, I am unable to create…
StyleZ
  • 1,276
  • 3
  • 11
  • 27