Windows Universal App grouped ListView issue - c#

I need some help in creating a grouped ListView for an Universal Windows App.
I found an example to do that but it was for windows 8 phone, and it was using CollectionViewSource class and bind the ListView ItemsSource to it. But this is not available anymore, at least for Universal Windows App template.
Please Help.
Thanks in advance.

There is no default XAML control for UWP that represents Expandable Listview.
However you can create your own or use custom one. Below you can find two possible solutions:
First one - I have created "Expandable ListView" like on the picture below.
You can find whole source code on my GitHub:
https://github.com/Daniel-Krzyczkowski/Windows10/tree/master/ExpandableListView
Second solution is to use "WinRTXAMLToolkit" which contains TreeView control:
https://github.com/xyzzer/WinRTXamlToolkit
Here you can find the post how to customize the control:
WinRT XAML Toolkit TreeView expanded display
Hope that I helped.

Related

Xamarin Android Grid control

Is there a suitable grid control in Xamarin Android, table-like, for a business app that supports databindind with collections that help altering various columns/cells?
As far as I find out, there are alternatives only by inheriting an existing control like ListView and creating a custom control.
If a control as one I am searching for does not exist, what could be the best option left?
Many thanks in advance!!
Is there a suitable grid control in Xamarin Android, table-like, for a business app that supports databindind with collections that help altering various columns/cells?
You can refer to GridView, it displays items in a two-dimensional, scrollable grid.
And this tutorial will show how to create a Grid View.

Custom control in Windows Phone 8.1 & Windows 8.1 with subitems

For one of my projects I need to create a custom control that contains sub-items and I need to be able to add these sub-items in XAML code. I mean something like this:
<controls:CustomControl>
<controls:CustomControl.Item>
</controls:CustomControl.Item>
</controls:CustomControl>
I did a search in Google and found some sample codes but all of them were for WPF and not Windows Phone. I found the usage of [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)], but it's not available in Windows Phone 8.1 and Windows 8.1.
What's the best way for creating custom controls that may contain sub-items inside and can be edited in XAML code?
To implement custom TabControl you should create a custom control derived by the Panel class and overide MeasureOverride and ArrangeOverride methods to implement custom layout.
XAML custom panels overview

What control did Github for Windows use, to show History?

I already search it on google about listview and datagrid but there's no one tell how to customize these control
According to Snoop it's a custom control named GitHub.UI.ListBoxEx. Since the project is not open source, no source is available with it.

Tree-view Alternatives

im currently working on a project that involves listing contacts with a photo and email address, kind of like messengers contact lists.
The problem is ListView just dont cut it!
I need something that's like the MSN Live Messenger contact lists, Witch consist of a large padded area with photo(32px), And text to the right of the photo but also have the expandable headers.
Anybody give me some advice on any references i can use or if its possible to do with Tree-view can someone show me an example.
Kind Regards.
I would recommend making a WPF user control and hosting it in in an ElementHost control in your Windows Forms project. I've used WPF inside WinForms in the past and it works great.
Assuming you add an element host control onto your WinForms called elementHost1:
elementHost1.Child = new MyWPFControl();
Are you using WPF? You could use a ListView after all with an Expander for the ItemTemplate. Blacklight also has a great AnimatedExpander: see Blacklight releases.
Hope that helps!

C# listview - embedding controls

Can anybody help me with embedding controls in the listview. I need to add button controls as subitem of listview. thanks
Well, you could be talking about the Windows Forms ListView, in which case you're pretty much SOL (sh*t outta luck.) You can custom draw on the ListView but even that has limitations in Windows Forms.
Or you could be talking about the Windows Presentation Foundation ListView. In this case it's really quite simple. You can create a DataTemplate that you associate with the ListView's columnn. Here's an example.
Or finally you could be talking about the ASP.NET ListView control which also has data templating support but the implementation is a bit different from WPF. Here's an example of that.
Use ObjectListView control which is opensource. It is excellent and is derived from ListView in Window.Forms.
Try Better ListView Express. It is free and allows custom embedded controls:
Better ListView has been created to fix known issues of the regular .NET ListView and solve common issues such as this one out of the box.
If you can use another control instead of a listview, try the DataGridView - you can add any type of control to a cell (subitem).
http://msdn.microsoft.com/en-us/library/e0ywh3cz.aspx

Categories