I need to display 10 images in 2 columns. I saw an ImageGallery.cs in XLabs but its incomplete, the renderers are 404.
The Images are in a List<Image> which contains string imageURL and other few properties. I thought about putting two ListView side by side, but that just seems stupid.
I'm using ViewModel, hence I want to bind the list and not add them one by one
XLabs ImageGallery is working fine (links are outdated):
Android:
https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/src/Forms/XLabs.Forms.Droid/Controls/ImageGallery/ImageGalleryRenderer.cs
iOS:
https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/src/Forms/XLabs.Forms.iOS/Controls/ImageGallery/ImageGalleryRenderer.cs
BTW: It's better to use ObservableCollection instead of List.
Related
Good morning,
I am developing my Web Application using .Net Core 3.1 and Razor Pages.
In my application I need to display a large amount of data on a grid and would therefor like to rotate a standard grid 90 degrees. I would like to obtain something like the "Horizontal Scroll" of this blog post but instead of just scrolling horizontally I would likle to move the headers to the side and, as mentioned above, rotate the entire grid fields.
I can't find any API that suites my needs though. Does anyone have suggestions on something I could try? I wouldn't want to have to build the entire grid myself (with all the paging, filtering and ordering logic). I am open for alternative solutions as well!!
Thanks everyone!
This seems more like an HTML question, and does not really relate to Razor Pages. Here are a couple of examples of horizontal scrolling HTML tables:
https://mdbootstrap.com/docs/jquery/tables/scroll/#datatable-horizontal-scroll
https://datatables.net/examples/basic_init/scroll_x.html
You said you need to display a large amount of data, I think the
design you currently want is not suitable for the display of a large
amount of data.
Because if the title is on the left, then only one data can be displayed on each page, and each page needs to load the title, which will lead to great redundancy.
If you just want to display beautiful because of too many columns, I suggest you use the responsive property in jQuery datatable, which can dynamically display the number of columns according to your current page width, and collapse or display the extra columns.
You can refer to this.
In my project, I need to create a list of feeds, something like:
I think to create a XAML content view, but how can use it as a cell?
Is it a good approach?
I think the best way to go is to choose Data Template Selector. If you use Data Template Selector, You can Choose a DataTemplate (view) at runtime based on the value of a data-bound property. Lets say, In your case, your List view might have 3/4 or any number of different kind of ViewCell. Based on the type of cell you want to display different view cell.
There is a nice tutorial on Xamarin doc, you can read at https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/templates/data-templates/selector
Read this one after that (this is a example for Chat App using ViewCell) https://blog.xamarin.com/customizing-list-view-cells-xamarin-forms-datatemplateselector/
Let me know if you need any specific help after reading that.
I'm writing a Cardboard app using the AppSDK within a Custom HTML app. So far, it is displaying properly (rendering all columns, column headers).
Is there a way to target and hide certain columns and their headers from within the Cardboard app code? I can hide them using their CSS ID's.... However, this occurs after the app has rendered and results in a bit of an eyesore as the original app width will not resize.
TL;DR Rally Custom Kanban board (AppSDK) contains 6 User Story states. I want to hide the second and fourth states while still showing the other four.
There's an example in the docs that show how to create a board that has a specific set of columns: https://help.rallydev.com/apps/2.1/doc/#!/example/specific-columns-board
In that case it's doing Owners for columns and some extra stuff with custom rendering of headers, but the guts of it is specifying the columns config to the board, which is just an array of config objects which will be used to instantiate Rally.ui.cardboard.Column objects.
SOF Tribe,
I'm trying to understand and implement the listview sticky header concept in a Windows Phone 8.1 app. It's a common enough behavior but for the life of me I can't find an example that implements it in a simple fashion with the interaction I require.
The top band of a ListViewItem (which I'm assuming is the header) must stick to the top of the list view while the body of the ListViewItem scrolls up underneath it. Until the next ListViewItem header butts up to the first header and "pushes" it up.
https://db.tt/BvZgm3Bn
(I'm not allowed yet to post an image into this space...)
Please excuse the crude mockup.
This seems like a easy kill but, well, there it is.
Thanks for any reply.
In WP8.0 with LongListSelector it was done with grouping with IsGroupingEnabled=true.
In WP8.1 with ListView and GridView it is done with grouping of your dataset into a CollectionViewSource but this time you also need to define a GroupStyle. Your dataset is then bind to a CollectionViewSource which has IsSourceGrouped set to true in place of IsGroupingEnabled.
If you need help grouping your dataset (from a flat list) think it as a List<List<dataitem>> where the outter list also has a key value. Search SO / Google on how to do this if you're new to grouping.
Full examples can be found here:
MSDN: How to group items in a list or grid (XAML)
I'm currently developing a Windows 8 Store app that uses a Grouped GridView in the HubPage showing Highlights for some Categories. So far, when clicking the Header you see More Highlights for this Category.
Now i want to add a control at the end of every Group leading the User to the "non-highlight" Category site, where just all the Items of this category are displayed.
Is there an easy and elegant way to do this - propably with a Template is suppose.
( i think the latest Bing-News-App has a similar feature )
Thanks in advance for every help.
There are a couple of ways you can do this.
You can add an arbitrary object to the end of your group, then use a DataTemplateSelector to style it.
You can create your own VariableSizedWrapGrid with the control added to the end in the constructor (slash "Arrange"). You can then add an arbitrary click handler as a dependency property and only show the button if the click handler is set, so you can reuse this on other pages, etc.
You can change the GroupStyle to include something similar at the end of the group, but it likely won't animate with the other items in the group (if that's important to you).
The easiest one to do is probably the first one. If your group is a list of SampleItems then make a subclass of the SampleItem class called something similar to TerminalSampleItem. Create a template for it (like you've made other data templates). Make an ItemTemplateSelector that has two properties, NonTerminalDataTemplate and TerminalDataTemplate (assuming you only have two data templates). Have the SelectTemplateOverride function check for (item is TerminalSampleItem);