Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# WPF ProgressBar "default" height

In WPF, when I put a ProgressBar in the XAML file, its height is about 2 or 3 pixels by default.

Tiny progress bar.

What height should I put for consistency with other Windows applications (and adjust height depending on dpi resolution, etc.) ? I tried setting Height="auto" but the result is the same.

<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="525">
    <DockPanel Name="dockPanel1">
        <ProgressBar Name="progressBar1" Value="33" DockPanel.Dock="Top"/>
        <TreeView Name="treeView1" />
    </DockPanel>
</Window>
like image 496
Suzanne Soy Avatar asked Aug 22 '13 16:08

Suzanne Soy


1 Answers

Windows Progressbar Guideline has a pretty good starting hint,

Recommended sizing and spacing

Just incase the link goes away:

enter image description here

like image 123
Viv Avatar answered Sep 20 '22 04:09

Viv