How to properly build a grouped ListView for Win 8.1 and future versions?

Hi,
I am porting a Windows Phone 8 app to Windows 8.1 and trying to create a grouped list of items using a ListView. After several hours of trying and reading the ListView documentation I am totally confused and still have no idea of how to correctly use the
ListView.
Of course I found a lot of descriptions of how to style a ListView but it seems that ListView was heavily changed in Windows 8.1 and most examples refer to Win 8.0. Styles that worked in 8.0 can lead to crashes in 8.1.
The ListView has an ItemPanel, an ItemTemplate, a GroupStyle... The GroupStyle uses a HeaderTemplate, a Panel, a ContainerStyle, etc... ContainerStyle is honered in Win 8.0 but not in Win 8.1 if ItemPanel is an ItemsStackPanel... Also ContainerStyle will
not be supported in future versions, etc... What...?
I would like to style the ListView like this:
Problem 1:
How to stretch the Header over the complete width. The solution I found was to alter the default GroupStyle.ContainerStyle to stretch the HorizontalContentAlignment of the HeaderContent instead of using the default left align. Workes fine, but the
docu says:
"[ContainerStyle may
be altered or unavailable for releases after Windows 8.1 and is not supported for
ItemsControl.GroupStyle.]"
So, how to stretch the header without using ContainerStyle?
Problem 2:
How to add a footer to the group?

I have the same problem and have tried the stuff above. When I edit the xaml code the GroupHeader expands to the width of the ListView. But when I compile
the code it collapses to almost 1 pixel in width (it looks like that), beginning to be a bit frustrated :-(
Here is my listview xaml code:
        <ListView
x:Name="MainListView"
 Grid.Row="1"
 Margin="10,10,10,0"
 ItemTemplateSelector="{StaticResource
MinTemplateSelector}"
 ItemsSource="{Binding
Source={StaticResource
GroupedData}}" >
<ListView.ItemContainerStyle>
<Style
TargetType="ListViewItem">
<Setter
Property="HorizontalContentAlignment" Value="Stretch"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.ItemsPanel>
                <ItemsPanelTemplate>
<VirtualizingStackPanel
/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<Grid
Height="70"
 Background="#FF662485"
Margin="0"
 Width="{Binding
ActualWidth,
 ElementName=MainListView,
Mode=OneWay}">
<TextBlock
Text="{Binding
GroupName}"
 FontFamily="Segoe UI Light"
       FontWeight="ExtraLight"
 FontSize="26.667"
Margin="9,0,20,0"
 HorizontalAlignment="Stretch"
 VerticalAlignment="Center"
 TextTrimming="WordEllipsis"
Foreground="White"/>
</Grid>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ListView.GroupStyle>
</ListView>
Any ides why it goes wrong ?
/Mads

Similar Messages

  • How to test basic sql queries online(for Sql Server 2012 and up versions) ?

    Hi,
    I need to test basic sql queries using sql server without installing Sql Server on to the system.
    Do we have such readymade online help, which can solve such difficulties ?
    Please sugest some of url's.
    Thanks.

    Thanks for reply.
    I am looking specific Sql Server.
    Hi Maggy,
    I strongly recommend you install SQL Server 2012 express edit and test your T-SQL queries. We can download it from the following site:
    Microsoft® SQL Server® 2012 Express:
    http://www.microsoft.com/en-hk/download/details.aspx?id=29062
    Regards,
    Elvis Long
    TechNet Community Support

  • How to prevent user or group to use 3-tier WebI and DeskI in XI 3.1

    How to prevent user or group to use 3-tier WebI and DeskI in XI 3.1
    This function is enable in BOE 6.5 by using Supervisor.

    Hi,
    You can explicitly deny access to these applications from the CMC in BOE 3.1. Open the CMC, click on BusinessObjects Enterprise Application and then select the WebI.
    From the right hand side click on the 'Net Access' section for that group and disable the 'Log on to Web-Intelligence and view this object in CMC.'
    This will prevent the option of the WebI for that group.
    I hope this helps you.
    Regards,
    Prashant

  • When I try to update apps on my iPad, it asks me for my mothers password and displays her apple ID.  How do I change it to ask for my apple id and password???  I am signed into the store and iCloud with my apple id.

    When I try to update apps on my iPad, it asks me for my mothers password and displays her apple ID.  How do I change it to ask for my apple id and password???  I am signed into the store and iCloud with my apple id.  I am not signed into ITunes, the store on the ipad, or icloud under her name.  WIERD???

    There is no featured tab in my iTunes store. . . and everywhere it shows me signed in. I had downloaded an app for my mother on HER ipad, and that is the only app I have done for her. It shows up on my phone, and now I cannot update any of my apps. I uninstalled that app on my phone, but when I want to update ones I have installed on my phone with my appleid, she keeps showing up.
    Joyce

  • My iMac (late 2010 model) desktop's hard drive is fried (was about 200GB). How much am I expecting to pay for a new one and retrieve my information?

    My iMac (late 2010 model) desktop's hard drive is fried (was about 200GB). How much am I expecting to pay for a new one and retrieve my information?

    As you can see Erin, trying to recover information from a hosed drive can be very expensive. 
    I would suggest first the OWC site as well. You can get a new drive of choice in size there.
    I would also get the voyager  http://eshop.macsales.com/item/Newer%20Technology/VOYQHDB1.0T/
    and..
    http://eshop.macsales.com/item/Prosoft%20Engineering/DGDR3BUN/
    http://eshop.macsales.com/item/NewerTech/TOOLKIT11/
    Wth your lap top and these folllowing tools your are set to change out the drive, reload OS and then with
    the voyager pop in the old iMac drive and with the Prosoft software, try to mount and recover the files. Data Rescue is very good at this " if " the drive is not totally mechanically hosed. Drive Genius is very good at a number of things too. Nothing replaces the old adage of Back Up Back up Back up.
    The voyage I listed can become the new backup drive for you.. your choice of tools: Time Machine or by cloning via CarbonCopyCloner or by what I use SuperDuper! IF you want to be really kewl.. both. By that I mean cloning and Time Machine.
    It will take you an hour to swap out the drive and spring clean the iMac.. there is a hundred how too,s on you tube.
    Hope this helps. Remember if is always when a drive will fail..they all do. I tell the people I support that Harddrives are good for 15 min.. to when they don't work. They will all fail.
    Apple Geniuses are very limited to what they can and will do as far as file recovery.
    Your best bet is to try to do it your self first. There is lots of help out here and you are not the first.
    Don

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

  • WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?

    WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?
    I have installed KB2734608, but when I search MS13-101 , no patch for Win 2012.
    Can you help me resolve this problem ?
    Thanks

    On Thu, 10 Apr 2014 06:01:48 +0000, fujitsu08 wrote:
    WSUS 3.2 work on Win2008 R2, how to use it deploy MS patch for Win 2012 ?
    WSUS has its own, dedicated forum where the WSUS experts answer questions.
    You should repost your question here:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverwsus
    Paul Adare - FIM CM MVP
    Aibohphobia: n. Fear of Palindromes

  • How do you resolve error 213:11 for photoshop elements 9 and 8

    how do you resolve error 213:11 for photoshop elements 9 and 8?

    Hi,
    Please refer to:
    http://helpx.adobe.com/creative-suite/kb/error-store-does-not-allow.html
    Thanks,
    Anwesha

  • How could I set the proxy settings for just some URLs and not for all?

    Hello,
    I am using HttpURLConnection to establish a HTTP connection . The connection pass through a proxy, and it requires security.
    I know that I can set the proxy settings in the system properties, and this works perfect.
    But I don't want to set the proxy settings in the system properties, because this proxy settings will be for ALL the URLs, and I just want for a few URLs.
    How could I set the proxy settings for just some URLs and not for all?
    Thanks

    java.net.URL.openConnection(java.net.Proxy proxy)
    @since 1.5

  • How do I configure itunes to look for my Outlook contacts and calendar?

    Being fairly new with the iPhone, how do I configure itunes to look for my Outlook contacts and calendar?  At the moment,when I try to sync, I get the "No supported calendar application can be found" message.  Thanks!

    You could try uninstalling iTunes and all of its components as by following this guide: http://support.apple.com/kb/HT1923, then reinstalling iTunes.  This will replace a potentially corrupt Outlook plugin.  You must follow this guide exactly or it will not be successful.  Note: uninstalling iTunes will only remove the application; it will not touch your iTunes library or data.

  • How to create an online fillable form for mobile devices, tablets and smartphones.

    How can I create "online fillable forms" for Mobile devices, tablets and smarphones?
    I already created an "online fillable form" with Adobe Acrobat XI Pro for PCs and MACs but this form can not be filled using mobile devices, it can only be downloaded.
    Thanks.

    Hi George,
    I gather from your reply that I won't be able to create "online fillable forms" for Mobile devices with Adobe Acrobat XI Pro. Correct? 
    If Adobe does not have another software similar to Adobe Acrobat XI Pro, would you please suggest me any other means of creating "online fillable forms" for Mobile devices? 
    Would you think that an HTML developed form would be a fair substitute for the PDF fillable forms that I use for PCs and MACs?
    Thanks,
    Alvaro

  • Where is the download link for premiere elements 10 and previous versions?

    Where is the download link for premiere elements 10 and previous versions?
    Also the search program doesn't find previous version downloads.
    Chat is completely busy and won't let me in.
    And I am not paying $39 for what is an Adobe issue.
    FAIL!
    Anyone know where I might find it?

    A.T. Romano wrote:
    ProDesignTools offers these downloads for the Adobe tryouts of older Photoshop Elements and Premiere Elements versions
    What I've always found strange though is that the downloads themselves come from Adobe's servers. Just seems weird that Adobe themselves won't provide the links!
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • How do I create a group list for email contacts with the I pad ?

    How do I create a group contacts with the iPad ?

    If you set up groups in iCloud, a contact can also belong to multiple groups. And no work around or mispurposing of a field needed. You can also filter a group without using the search function. Plus, your contacts are backed and available via another avenue if needed.
    Not questioning your solution - I'm sure it works - but the functionality exists within the design.

  • How do I create a group contact for imessage?

    Is there anyway to create a group contact for iMessage text messaging?

    This is the groups app.
    https://itunes.apple.com/us/app/groups-sms-mail-manage-contacts/id300891442?mt=8

  • How to properly create complex OCI objects (for Annotation Text)

    I am upgrading a tool that will upload text objects to a table with a ST_ANNOTATION_TEXT field. The app is a C++ app and I need to instantiate a ST_ANNOTATION_TEXT (using OCIObjectNew??). I actually have 2 questions. First, does anyone have an example of how to accomplish this? I seem to be unable to correctly create the annotation text type in C++ to be able to append to (calling OCICollAppend). Second, since ST_ANNOTATION_TEXT is a complex type (contains an array of annotation text elements), do I need to call OCIObjectNew on not only the main ST_ANNOTATION_TEXT type but also for the ST_ANNOTATIONTEXTELEMENT_ARRAY, ST_ANNOT_TEXTELEMENT_ARRAY, and the ST_ANNOTATIONTEXTELEMENT?
    I can't seem to find in info on this so hopefully someone else has been through this.

    user3068343 wrote:
    I am still having an issue where the sub objects are still NULL.Actually I was mistaken. I must have confused getting an Object from OCIObjectNew with using one of its constructor method in a statement.
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28395/oci18nav004.htm#sthref3438 clearly state the object will have NULL attributes, unless the OCI_ATTR_OBJECT_NEWNOTNULL flag is set on the environment handle.
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28395/oci11obj.htm#i446308 further tells you what the default value for the object members will be.
    An older 9i doc http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96594/adobjadv.htm#1008774 also warns about resetting the indicator struct member when you update a member of the object.
    user3068343 wrote:
    ++a) you allocate the object's top-level struct yourself (SDO_GEOMETRY in my case) in C+++
    Above you suggest creating the objects top-level struct myself. How do you create that top level object? I have been using OCIObjectNew on that object as well as its sub objects? Is that how you are creating the top-level object?This technique works only on binds, as objects you get back from defines are always allocated from the object cache. I create the top-level object directly on the stack... This is something I discovered worked, but is not documented, so you're probably on safer ground using OCIObjectNew instead.
    BTW, the reason I can't easily post OCI example code is that my code uses wrappers around the objects that hides most of the OCI:
    Geometry Geometry::make_point(OCIEnv* envhp, OCIError* errhp, float x, float y) {
        Geometry point_geom(envhp, errhp);
        point_geom.set_null(false);
        point_geom.gtype() = 2001;
        PointRef point = point_geom.point();
        point.set_null(false);
        point.x() = x;
        point.y() = y;
        return point_geom;
    }The above creates an 2D point-type SDO_GEOMETRY hidden inside the Geometry class, itself deriving from a GeometryRef class. The latter wraps a C++ API on top of the struct pointers for a SDO_GEOMETRY/SDO_GEOMETRY_ind, while Geometry actually composes the OTT generated value/indicator structs by value, and passes addresses to its nested structs to GeometryRef (its parent class). So GeometryRef can manipulate an object irrelevant of where it was allocated, the stack or the object cache. The Geometry class is a value class, but it's useful for binds only, and like I said uses a behavior which appears to work but is not explicitly documented.
    Unless you have nested objects by reference, nested objects are composed by value in the OTT-generated structs, so the space for all nested objects is already allocated after the first OCIObjectNew. But the members themselves are not initialized, and thus marked as null in the indicator struct.
    In the code above, my Geometry instance is fully allocated (on the stack), but fully uninitialized (the indicator is by default set to all nulls). I first set the atomic flag to non-null, then get the Ref wrapper around its nested SDOPOINT_TYPE to also set it to non-null, and fill in the x/y member (via another NumberRef wrapper, which knows about the member and the indicator for that member, and sets it as non-null when assigned to). Notice how how I return the instance by copy: My point geometry instance doesn't have a pointer-aliasing issue here, only because its two OCIColl* are null. In the general case, you can't copy my value wrappers without making a true deep copy... But I'm getting into the weeds here.
    The important point is that OCIObjectNew doesn't init the nested objects unlike what I stated earlier. Sorry for misleading you on that. --DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for