I want to style a view similar to iPhone Appstore app. I don't understand how the view is laid using IB or is it laid programatically.
I dont know. Are they multiple collection view laid on scrollview or is it one collection view with some custom layout or table view.
Also every collection view is scrolling horizontally and having Header-type on the top where one can click on SEE ALL > .. it cant be header supplementary view because it will be then on the left as scrolling is horizontally and not on top.. how is this done
Thanks
Each row is a custom UITableViewCell with horizontal UITableView in it and this horizontal UITableView has another custom UITableViewCell to represent one app on the horizontal list. Thus, users are being able to make vertical and horizontal scrolls.
For the header-type and See All button you can use the following UITableViewDelegate method:
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
The following article makes similar output with UITableView and UITableViewCell that contains horizontal UITableView.
http://www.raywenderlich.com/4723/how-to-make-an-interface-with-horizontal-tables-like-the-pulse-news-app-part-2
Related
within WPF I have created a ListView which displays a list of messages in chronological order using a custom ItemsPanel class which uses the time of the messages to correct space them apart when laying out the items;
Is there an easy way to go one step further and add 'other drawing items', for example a timeline (line, ticks and text), to the background of the ListView which scrolls with it? What's the best approach?
Thanks for your comments, but my solution was to add an ItemsControl which binds to a Timeline collection of integers (one every 100ms) that's sits on top of the ListView (and scrolls with it) which simply has two lines it the ItemTemplate to get the following result:
ListView with added timeline markings
I recently wrote a routine that displayed a grid of images from files in a folder. I used a vertically-oriented ListBox where each row in the ListBox was a horizontally-oriented StackPanel of the images. I just had to walk the folder tree and populate the StackPanel. It was simple, quick and easy to implement.
Now I have a new requirement. I'll be receiving the images one-at-a-time from a piece of factory equipment that will be sending one every few seconds and I need to display it as I get it. I still need to display these in a grid but the images start from the lower left and proceed to the right until a row is filled up, then we start a new row directly above it. We WILL know at the start the final dimensions, but it may be more than we can fit on a screen so scrolling will have to be enabled.
What are the right controls to use for this in WPF? Is there a way to reuse my ListBox/StackPanel scheme or are there more appropriate controls for this? Remember, the images must be displayed as I get them - I can't fill up a whole StackPanel and then do a
listBoxImages.Items.Add(myStackPanel)
... or can I - can I add an empty StackPanel to a parent and then populate one image at a time afterwards? What's the right way to go about this?
Based on the fact the number of images is known at the start of the routine, I would create a view model with a collection of collections.
The first is an observable collection with elements for each row, inside the element is another collection for each column. This can be bound to an items control where the content template has a second items control with horizontal orientation.
Then, as your images arrive, you start to fill the last element first with your image references and work back up. That should create the desired effect. Not sure how that works with scrolling as you effectively want the last element to be in view first, so scrolled to the end.
Another option, using a single collection is to bind to an items control with a uniform grid panel template. This can be wired up with a DataTemplateSelector which when the data is null, displays an empty template, otherwise shows an image box. This will allow you to again add elements to your collection in any order and it mirror on the UI.
An example of the data template selector can be found here. Or search SO.
I have 4 Panels that should be shown/hidden based on 4 radio buttons being checked.
only a single panel will be shown at a time.
all 4 panels need to be shown in the same position (within the same grid cell)
The problem is, once all 4 panels are put in the same grid cell, the panels are overlapped and
difficult to do changes to any specific panel in design mode.
Is there any way that we can hide the panels in design mode so that i can work on a single panel at a time?
Thanks.
Your best option is to create a UserControl for each panel, and display the UserControl instead of the Panel. You can then edit each UserControl by independently.
There is a pretty straightforward tutorial here - http://www.longhorncorner.com/UploadFile/raj1979/WPFUserControl09012008000033AM/WPFUserControl.aspx.
I'm using Silverlight 4. I know how to display items in a vertical or horizontal list using a ListControl or ItemsControl. However, I want to display items in a grid, like you'd see Windows Explorer viewing in grid of icons. How can I do this? Is there a control, or must I use a hack like ItemControls of ItemControls?
you probably want the wrappanel in the silverlight toolkit. here's an old example but you get the idea: http://blogs.silverlight.net/blogs/justinangel/archive/2008/11/05/silverlight-toolkit-wrappanel.aspx
In my gridview I need to aggregate subrows into each row, something like in p2p emule/amule application where you can do double click to each file you are downloading and then under it you can see the parts of the file from where you are downloading.
Is it possible in WPF?
Thanks.
You could do a few things:
Add some container (ie: another Grid or a StackPanel) to the Grid row. This would let you add multiple objects to the grid row. On your "double click" event, you could change the visibility to show those objects.
Use a TreeView with a HierarchicalDataTemplate, and treat this as hierarchical data. This is most likely the more "correct" approach. The Displaying Hierarchical Data sample on MSDN walks through the process of this.