Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is an example on how to have a listview with totals area at the end. The column width are binded between each column and its total</p> <pre><code> &lt;Window x:Class="WpfApplication2.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" Title="Window1" x:Name="ctl" Height="300" Width="300"&gt; &lt;Window.Resources&gt; &lt;GridViewColumnCollection x:Key="gvcc"&gt; &lt;GridViewColumn Width="{Binding Path=ActualWidth, ElementName=col1}" Header="Date" /&gt; &lt;GridViewColumn Width="{Binding Path=ActualWidth, ElementName=col2}" Header="Day Of Week" DisplayMemberBinding="{Binding DayOfWeek}" /&gt; &lt;GridViewColumn Width="{Binding Path=ActualWidth, ElementName=col3}" Header="Year" DisplayMemberBinding="{Binding Year}" /&gt; &lt;/GridViewColumnCollection&gt; &lt;/Window.Resources&gt; &lt;Grid&gt; &lt;DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" LastChildFill="True"&gt; &lt;GridViewRowPresenter Name="listview_total" DockPanel.Dock="Bottom" Margin="0,5,0,5" Columns="{StaticResource gvcc}"&gt; &lt;GridViewRowPresenter.Content&gt; &lt;sys:DateTime&gt;2005/2/1&lt;/sys:DateTime&gt; &lt;/GridViewRowPresenter.Content&gt; &lt;/GridViewRowPresenter&gt; &lt;ListView x:Name="listview_rows" SelectionMode="Single" DockPanel.Dock="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled"&gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn x:Name="col1" Header="Date" /&gt; &lt;GridViewColumn x:Name="col2" Header="Day Of Week" DisplayMemberBinding="{Binding DayOfWeek}" /&gt; &lt;GridViewColumn x:Name="col3" Header="Year" DisplayMemberBinding="{Binding Year}" /&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;sys:DateTime&gt;1/2/3&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;4/5/6&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;7/8/9&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;10/11/12&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;1/2/3&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;4/5/6&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;7/8/9&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;10/11/12&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;1/2/3&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;4/5/6&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;7/8/9&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;10/11/12&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;1/2/3&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;4/5/6&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;7/8/9&lt;/sys:DateTime&gt; &lt;sys:DateTime&gt;10/11/12&lt;/sys:DateTime&gt; &lt;/ListView&gt; &lt;/DockPanel&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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