Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason is that your <code>stackPanel</code> is in <code>Grid.Col="0"</code> and it is very small. But <code>ListBox</code> is inside of your <code>stackPanel</code>. It has a margin and it goes down. Is you can't see your <code>listBox</code>.</p> <p><br> <img src="https://i.stack.imgur.com/vcFdj.jpg" alt="enter image description here"> <br> If you will do something like this:</p> <pre><code>&lt;StackPanel Margin="0,0,0,-279"&gt; &lt;ListBox Name="listbox_name" Margin="1,30" Height="276" /&gt; &lt;/StackPanel&gt; </code></pre> <p>you will see your listBox and it will work. <br> <strong>NOTE:</strong> this code is only example. You need to make a better layout for your window.</p> <p><br><br> Here is how i made a window loyout:</p> <pre><code>&lt;Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="678" Loaded="Window_Loaded"&gt; &lt;Grid Name="grid1"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="130"&gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="380"&gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="146"&gt;&lt;/ColumnDefinition&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="30"&gt;&lt;/RowDefinition&gt; &lt;RowDefinition Height="*"&gt;&lt;/RowDefinition&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Text="File Name" Grid.Row="0" Grid.Column="0" Margin="5" /&gt; &lt;TextBlock Text="File Path" Grid.Row="0" Grid.Column="1" Margin="5" /&gt; &lt;TextBlock Text="File Size" Grid.Row="0" Grid.Column="2" Margin="5" /&gt; &lt;ListBox Name="listbox_name" Grid.Row="1" Grid.Column="0" BorderBrush="Black" /&gt; &lt;ListBox Name="listbox_path" Grid.Row="1" Grid.Column="1" BorderBrush="Black" /&gt; &lt;ListBox Name="listbox_size" Grid.Row="1" Grid.Column="2" BorderBrush="Black" /&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p><img src="https://i.stack.imgur.com/qvkV0.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload