XAML Table with sorting by column clicking in C++ UWP App - design and binding problems - xaml

I'm just beginning to build a Universal Windows Platform (UWP) C++ app using VS2015. I've worked in Android before and in .NET, but not UWP (and before you suggest using .NET, I'm using this as a project to get more C++ experience). I'm trying to add a screen to the app that will basically have a table with data that can be sorted by clicking on the corresponding column (one click for ascending, another to reverse. Click a different column header to sort by it instead).
Searching for help on this is a mass of craziness however. Half of the results recommend gridview but when I try to implement them parts of gridview turn out to be unavailable in the UWP platform and I can't seem to make it clickable. Others recommend listview but I want to have multiple columns that get sorted together on clicking of one, and keeping them in sync seems like it could get complicated. There are a variety of other options but I'm getting lost in the mix, particularly when some are then unavailable for UWP and MSFT seems to often have out of date documentation.
I'm also new to this XAML/binding approach and a bit lost with it. With an Android app version of this application I had an sqlite database from which I pulled a table that could be displayed to the screen. I was planning on a similar approach here but in that case what do I bind to? Do I query the database, build a table in memory, and then bind to that? That seems clunky and problematic if columns have different data types. And if gridview doesn't work, in what do I then display it?
That's a kind of vague and wide question I know, but this seems to be one of those instances where further research makes me more lost rather than bringing clarity so after a few hours of searching I thought I'd just ask for advice. This seems like it should be such a simple task that I must be doing something wrong. Any recommendations you have are most welcome!

There is no Control as you said in UWP.
Also it seems the data grid control to display data in a table is that you want. Please refer the DataGrid in this link: https://github.com/MyToolkit/MyToolkit/wiki/DataGrid. When we click the corresponding column the column can be changed.
We should be able to bind the date to the ItemsSource of the DataGrid and set the head name to DataGridTextColumn.
There is a sample for it, you should be able to see it in https://github.com/MyToolkit/MyToolkit/tree/master/src/SampleUwpApp.

Related

PivotItemHeader in two rows?

I'm currently building an app where I use a PivotControl as the standard navigation. I managed to style the headers now but after some thought I realised that I should probably make the whole app sizeable for different screens. Not every screen (especially in IoT scenarios) will be a full HD screen :D
Thats the current control:
My problem now is that when I make the screen and the PivotItem smaller it just cuts off the end of the pivots like you can see at the right of the picture.
What I would rather have is that when the PivotItem gets smaller I want the Headers to stack.
Like in this quickly googled example:
But I don't know how I should make that possible...
Does anybody have an idea?
What are you trying to build?
Could the content be organized in other way?
Pivots or similar controls (tabs, segmented controls etc) work best with few items that are important to the user and deserve the central stage.
The screenshot you added violates several UI best practices and I suggest you find an alternative to structure your UI that is user friendly.

Changing application layout via buttons in VB .NET

Currently I would like to program an application gathering forms that are callable with buttons on the side. For this, I am using the latest build of Visual Studio Community. One way I thought of would be to literally put all the form elements (textboxes, lists, etc.) in the application window and only enable them whenever the according button is clicked on. However, if this is the way to do it, I find it quite messy and unpractical, and I'm pretty sure there's another way around.
After some research, I have learned about the MDI layouts, but they don't suit my taste. I would like to keep everything in one single frame.
Could you give me a hand?

Is it possible to resize a DateTimePicker or MonthCalendar Control in VB.net

Essentially I want to re-size my dateTimePicker control to fit its parent container. I have tried to do this both through the Control Editor and programmatically but I simply cannot get the drop down calendar to expand at all. So 2 part question:
a) Is this even possible to do?
b) Is there an easy-to-implement solution to having a good looking calendar that fits its parent field? (i.e. using a data grid or something similar)
Any help or knowledge is greatly appreciated!!!
The size of both objects is fixed and defined by the size of its font. Thus you might change its size by affecting the font size. This works fine with DateTimePicker but does not seem to work with MonthCalendar. After a quick research I have found a pretty curious recommendation on the MSDN forum: "you can consider third party MonthCalendar controls to meet your requirement temporarily".
There are quite a few third-party options (after a really quick search I found this) or you might even create one by your own. I personally haven't ever had any problem with the in-built controls but if the size is so important for you I guess that you would have to search/develop something by your own.
Further recommendation: rely on WPF which does contain a resizable control (DatePicker). I want to highlight here that I don't like WPF at all and that thus this recommendation is because I don't see any other option (inside .NET).

Surface Table Project with Web Browsers

I'm working on a project that will use a Surface table to show web browsers that can be manipulated via the multitouch behaviors. I'd like to be able to show a browser at full screen and then resize, move, etc.
I'd also like to be able to launch a new, separate browser windows that can also be manipulated through multitouch.
Any suggestions on controls to look into for this?
Thanks!
This is a non-trivial task. As far as I know, many have tried and put months of effort into it but none of been very successful. Don't even bother trying to get something to work well based on WPF's built in WebBrowser control. Best bet is to start with the SurfaceScatterView control and trying to put a 'Chromium' control inside of it (http://wpfchromium.codeplex.com/). It appears that even this isn't straightforward though: http://wpfchromium.codeplex.com/discussions/244117

Is there a way to 'lock' the last item in a ListView to always show?

I am listing folders and folder sizes in a ListView for a VB.NET WinForm program I'm writing. I would like to total the folder sizes in the last entry of the ListView and 'lock' it show it always shows (even if scrolling through the list.
Is there a way to do this? I'd really like to avoid adding another control on the Windows Form to display the total.
EDIT:
Space is somewhat of an issue as I'm trying to keep this window small enough to work in a min screen resolution of 800x600 (I know, waaaaay not the standard, but I want to make this available to even those in the elderly community with problematic eyesight.
Thanks!
-JFV
There appears to be ways to do this in Webforms and WPF, but not in Winforms. You should probably use a text box. Any attempt to hack in a fixed totals row would most certainly be far more effort than the benefit obtained. It is certainly beyond my capabilities. Even the custom control shops like Telerik don't seem to do this.
http://www.telerik.com/products/winforms/gridview.aspx
If you're concerned about space, make the gridview a little smaller to accomodate the text box.