how can i implement dynamic navigation/group header positioning in a winrt app? - windows-8

I know the title is a little confusing, but the best way to describe what I'm after is by running the Weather metro app on the Consumer Preview; as you scroll horizontally, you'll note that the section headings kind of move around and stay on top of the relevant content, and then fade out as you cross over into a new section. (The main background for the first section also kind of does this)
My question is, how would I go about replicating this behavior in a WinRT app of my own? Are there any existing controls I can leverage or would I have to essentially rewrite it all?

This looks just like a ScrollViewer - you would handle the ViewChanged event and depending on the scroll offset - change the opacity of overlaid static TextBlocks and completely hide the ones that scroll once you cross specific tresholds. I don't think there is anything like that that does it, but I can build it.

Related

How do you properly position elements in XAML without using absolute position?

I have a UWP app that I am working on, and using absolute position creates problems when using the app on screen sizes different than the one it was designed for.
I'm not sure how exactly i should place elements at distances from each other without using margin and absolute position. How should I be doing this?
Edit: I am using XAML to design the UI.
Well, it depends on what UI you want to build up.
There are various panels and, usually, there is NO need to use absolute position in most cases.
Usually, the Grid panel is used to create flexible layouts, by adding rows and columns: for example, if you want to create a page with some content and a bottom app bar with buttons on it, you usually create a Grid with as many rows as you need for your content controls, plus one for the bottom appbar itself.
Years ago, I also started building UIs by using absolute position for every element, but then times passes and you start having a flexible mind in order to build flexible layouts.
Sorry to not answer any further, but your question is just TOO broad to give any precise answer.
Best regards
How do you properly position elements in XAML without using absolute position?
You should use an appropriate layout panel:
Layout panels are containers that allow you to arrange and group UI elements in your app. The built-in XAML layout panels include RelativePanel, StackPanel, Grid, VariableSizedWrapGrid, and Canvas.

How to build below screen in titanium?

below i attached an app help guide screen. I am understanding how to build this screen.
If any body have idea please share here
View with semi transparent background color (backgroundColor:"rgba(0,0,0,0.5)";) and some images on top of it.
So, using images is bad. You'll need images for translations and if you do this as one image you'll need to ensure all devices are covered so your arrows point to the right element.
Minimise images == smaller app.
First thing you'll need to do is a create a blocker view -- so that's a view that will fill the screen and have a black background with opacity.
You can't apply that to the window as everything in it will be semi-transparent so:
Create a transparent Window that fills the screen.
Add to that window a view that fills the window and has opacity say 0.5 and black background
Add to the Window (not the view you just created) the other elements and button -- ideally, these should be individual graphics of the arrows, sized in such a way that you can position them based on the host element (the item they are pointing to / referring to). Use real text so you can handle translations / reduce file size.
So you'll need a way to associate each tip with a control they are anchored too, and that will ensure that regardless of the screen size, the tip will appear in the correct place.
First of all, always give a try before putting questions anywhere because it makes you learn things on your own for long time.
The easiest step for you to do this is to ask your designer to create a complete image just like that & you just have to show it on top.
If you have to show that image in different translations, then you can ask your designer to provide you required translations images.

How to apply UI virtualization to ScrollViewer in WinRT

Is it possible to apply UI virtualization to ScrollViewer in WinRT. In my application I am creating a line chart with the help of Polyline(Polyline embedded inside a scrollviewver). But in the current case, If it come more than 500 points. It blocks the UI during the time of interacting with the Map. So what I am trying to achieve is to apply kind of UI virtualization to scroll view. If anyone had any idea to solve this please help me.
The way I would handle a Polyline is I would break its data into sections, perhaps screen-wide ones (assuming horizontal-only scrolling), put a Canvas inside of the ScrollViewer, make the size (Width) of the Canvas the total size of the chart and put a few (say 5) Polyline controls in it and then on the ViewChanged event update the Polyline controls' Canvas.Left and Points properties to correspond to the area around the current view port of the ScrollViewer. That should give you smooth scrolling. Just don't add/remove or update the controls on each ViewChanged and only update Canvas.Left and Points when you need to - that is when you don't have a Polyline ready to display next to the current view port.

WinRT GridView scrolling setup work differently on mouse/kb and touch

I'm trying to mimic the functionality of the NetFlix app, with a strip on the left that collapses on scrolling, I had to offset the tiles on the GridView a bit to the right so that they can accomodate that behavior. They seem to work alright in keyboard and scroll completely to the right (although I noticed the scrollbar suddenly grows in size when I hit the left boundaries. this totally changes when I use it on touch - I seem to have a limit on the right and the scrolling doesnt scroll past the last 100 pixels or so. how do I take care of this.
I'm assuming it is related to the bug here, but didn't seem to solve the problem with that solution there.
"Sticky scrolling" issue in WinRT XAML GridView control
Jay, I bet you solved it in the meantime. But I'll add my solution here anyway; it might save time for other fellows.
This effect - not being able to scroll to the very right end horizontally with touch - did go away when I either:
*) changed the VirtualizingStackPanel to a StackPanel
OR
*) Grouped the GridView (with VirtualizingStackPanel in the ItemsPanelTemplate) into a simple ScrollViewer
Hope that helps!

Create Vertical-Tabbed OS X Cocoa View

I'm interested in having a application with a layout similar to the tabbed operation of iChat (see image below).
Does anyone know of any pre-built constructs that allow this sort of UI? I know there is NSTabView for tabs across the top of the application, but what about vertical orientation? For my purposes, the view associated with the tabs doesn't necessarily need to scroll. In fact it has nothing to do with chatting anyway, I simply like this layout.
Thanks.
The view on the left is an NSTableView with source list-style highlighting:
tableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleSourceList;
You can use a tabless NSTabView for the right part, but you could just as well change the content of the displayed views or swap the views entirely. That depends on how many “tabs” there’ll be and how the content displayed on the right side will be different.