Trying to decide on the best element to use for a grid view, pretty much exactly like the one you'd see in uTorrent or any other upload/download client. Specifically, I want to have a 'progress' column too (with progress bars). Using VS2010/.NET4. Haven't really started the project yet, so either WPF or WinForms are fine. What would you recommend?
+1
A:
If you're willing to write some of it yourself this might be helpful:
Nathan
2010-05-05 22:29:22
A:
Turns out, you can stuff ProgressBars right in there:
<DataGrid Name="dataGrid1" ItemsSource="{Binding Path=Items}" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HeadersVisibility="Column" GridLinesVisibility="None" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=Uri, Mode=OneWay}" Header="Uri" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Path=Size, Mode=OneWay}" Header="Size" IsReadOnly="True" />
<DataGridTemplateColumn Header="Progress">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ProgressBar Value="{Binding Path=Progress, Mode=OneWay}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Path=Eta, Mode=OneWay}" Header="Eta" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Path=Priority, Mode=OneWay}" Header="Priority" IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>
Took a bit of fumbling with my near-0 knowledge of WPF, but it's looking pretty sweet so far.
Mark
2010-05-06 08:10:07