简体   繁体   中英

Indeterminate progress bar within data bound listview

I have a listview that is bound to an object and in the listview I want each record to have its own progress bar (indeterminate) that I can start so the user knows something is happening with that record. This progress bar has no % because I am indexing files and I have no starting count to create a percentage from. So I tried adding a "progress bar" to my object and binding it but all that displays is "System.windows...." instead of the actual progress bar. Does anyone know how to bind that progress bar correctly so I can start/stop it for each record?

Here is some snippets on how my data is bound

<ListView ItemsSource="{Binding DbaseCollection, NotifyOnTargetUpdated=True}"

<GridViewColumn DisplayMemberBinding="{Binding Name}" 
                HeaderContainerStyle="{StaticResource searchResultsColumnHeader}"
                customcontrols:GridViewSort.PropertyName="Name" Width="Auto">

You will need to create a CellTemplate (do not use DisplayMemberBinding at the same time)

<GridViewColumn>
    <GridViewColumn.CellTemplate>
        <DataTemplate>
            <ProgressBar .../>
        </DataTemplate>
    </GridViewColumn.CellTemplate>
</GridViewColumn>

What properties on the ProgressBar you bind is up to you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM