Selective Virtualization in WP7 Listbox with VirtualizingStackPanel - windows-phone-7

I am referring an app like Facebook WP7 app. When we try to scroll a long list of the feed items. Only the heading of an feed item seems to be visible and when the scroll is completed remaining details gets loaded. If it is a normal Listbox where virtualization is enabled complete data disappears and all the controls seem to be recycled. So in facebook app, I thought that the virtualization is happening on selective items. Am I right?
If yes, how to do a selective virtualization? and if I am wrong what is the app exactly doing? Any resource regarding this will be helpful.
Thanks in advance.

I believe that this is just how their data binding works.
They get an initial list that contains the "headers" and some basic information, which they show. They then make more calls to grab the rest of the info. When that info comes in, it updates in the view model and thru databinding shows up on the list.
I have apps that do that, and they behave similarly to how FB's listbox behaves.

As Willmell pointed out, this msdn link describes what Facebook is doing exactly. The template of the listBoxItem will be switched while scrolling.

Try to look here. This guide helps me to solve a similar problem.

Related

Custom Interactive UI Boxes in Google Apps Script

I know this question has somewhat been asked before, but I could not find a definitive answer for it.
I am attempting to make an interactive, custom-designed UI menu for a google doc add-on. I would like to be able to code in items such as pull-down menus or checkboxes. Are these possibilities with this discontinuation of the UI Service? And if so, how would I go about coding this? Even a link to a place that might have suggestions would be a help. Thanks!
As you mentioned, the UI Service has been deprecated and replaced by HtmlService. HtmlService let's you build a complete UI with HTML, CSS and client side Javascript, so you can make the UI as simple or complex as you like.
HtmlService intefaces can be rendered in sidebars or in popup dialogs, see https://developers.google.com/apps-script/guides/dialogs
See the HtmlService documentation here, https://developers.google.com/apps-script/reference/html/

How to show use Page.IsBusy in xamarin.froms?

I binded property IsBusy="{Binding IsBusy} and label from my page to viewmodel property. I see value changed in label, by i can't see any busy indicator on page on android, is it right?
I think there is some confusion over the IsBusy property. On iOS it shows the indicator in the statusbar which is questionable because the indicator there, according to iOS guidelines is only to be shown for network activity.
On Android it doesn't seem to do anything (visually) at all. Also see this bug on Bugzilla where this discussion is ongoing on what you, as a developer, can expect it to do.
When we read the documentation page for the IsBusy property it says:
Marks the Page as busy. This will cause the platform specific global
activity indicator to show a busy state.
So you should be able to see an activity indicator, also on Android. But in the bug mentioned earlier it is stated that it only appears if certain conditions are met or not at all when using AppCompat.
For now, if you have a requirement for this, I think it would be best to either skip over it for now until this is sorted out or implement your own visual aids.
The activity indicator on Android was removed as part of the transition to material design, as it was no longer inline with the design recommendations.

firefox add-on sdk: make panel to stay visible

I'm trying to build a Firefox add-on based on their SDK and I wanna use panel for this. The panel is connected to a widget, so every time I click on the widget icon the panel shows up.
My problem is that I want the panel to stay visible even if I click on an area outside the panel and to be able to close only based on a certain situations.
Can this be achieved, or the panel API doesn't support this?
Thanks
It can't be achieved through the SDK API. However, you could actually "hack" the panel in order to be persistent, the problem is that you will face with other issue – basically won't go away, and other small stuff.
You can get additional details on Bugzilla if you're interested: Add a "isPersistent" attribute for panels. Notice that the bug is a WONTFIX, but it will give you an idea about the issue you could face. Also, there are some new widgets that will coming in the future, that could mitigate the needs to have the panel "persistent" (they're mentioned and linked in the bug above).
This is the offical sdk method of doing it:
let myPanel = Panel({.....})
let { getActiveView }=require("sdk/view/core");
getActiveView(myPanel).setAttribute("noautohide", true);
Floating panels are not supported by the SDK

Doubts regarding handling the state of pages in Wp7 Phone App

I have the application ,in which i save the state of the page and while deactivate the application,and once i get in foreground the application,i will restore the data.But when i click the back button at the time,i don't have the Object instance for the previous page .So how can i handle at that time?
On BackKey Press,I need to some thing like
1)Check the pages in the stack,remove the previous page and create the new instance of the page or any other think?
Your data should be saved when your application is deactivated and reloaded when your application is restored. It sounds like you are not restoring your data correctly.
This is where using something like MVVM model where your data is separate from your UI code is really helpful. Check out the MVVM light toolkit on CodePlex.
http://mvvmlight.codeplex.com/
It is too general a question to give more specific answers than that. Sorry.
Try coding up something and posting specific questions regarding your code.

WP7: Is it possible to intercept the backstack before the journal thumbnail is created/stored

You all know the Windows Phone backstack right. If you go through some apps, tap the Home key after starting each app. Now tap and hold the Backkey to see the Backstack. You can now see some small images of your apps, and can pick which one to go to right.
Question:
Is it possible to intercept before the backstack image is created? I have tried to blur my page in various events (include OnNavigatingFrom) to no avail.
My guess is some other event (probably something we don't have access to) is triggered and a bitmap is created, because when you use the Backstack to navigate you can just see a slight transition from the saved image to a real page IMO.
Does anyone know if its possible to intercept or manipulate these images on the backstack?
Example screenshot from WP emulator of the Backstack thumbnails
Following my comment, I've just tried this:
Set a breakpoint anywhere in the code
Start the app with the debugger attached, then let it reach the breakpoint
While the execution is stopped by the debugger, long press on the back button
The task switching UI is displayed even though the managed code execution is stopped
From there, I think we can safely conclude that the task switching and the thumbnail are handled entirely by native code. Therefore, there's nothing you can do.
I recently wrote a blogpost in which I discuss the ways I tried to hide data from the application snapshot. (You can read it here: http://corstianboerman.com/trying-to-hide-crucial-data-from-an-application-snapshot/)
The outcome: You just can't hide it.

Resources