Update to the featuring of the posts

Its been a while since last posted and realized that I owe it to the readers and followers of this blog an update why there have not been new articles regarding featuring.

Since, as you might be aware, Nokia Developer has been discontinued and hence all support to discussion board has been withdrawn by Microsoft. In effect to this, there has not been any more featuring (Quite obviously!).  Regretfully, none of the links to the previously posted articles that link to the Nokia Developer site might work.

See you around sometime soon (Hopefully) with something new…

Until then…Happy coding!

Advertisements

HTML Agility Pack Implementation

The Featured Discussion Board Post this week is HTML Agility Pack Implementation started by Keith Kerswell.

Keith is developing an application on Windows Phone 8. He is looking for an implementation of the HTML Agility Pack that will help him extract data out of his target webpage and display the page in his application.

Keith has tried various online samples and tutorials but is unable to implement it and wants help to find suitable resource. Neil Turner not only provides him with step by step guide on how to do it, but also helps him with some common issues and fixes. Neil gives him consistent support to see him through with the full solution, with suggestions like using HttpClient rather than WebClient for his use case.

Keith is able to completely sort out his issues and successfully implement the HTML Agility Pack.

We decided to feature this thread because it highlights how the community can help you persistently to sort out all issues.  The thread also highlights the utility of the HTML Agility Pack.

See About Featured Discussion Board Posts for more information.

Keep those interesting questions coming!

Issue while expanding and collapsing in longlistselector

The Featured Discussion Board Post this week is Issue while expanding and collapsing in longlistselector started by Vineet Jain.

Vineet is developing a Windows Phone application. He has implemented a long list selector. Each item in the list has a header and a rectangle, which can be expanded to make it visible, or collapsed. His implementation works fine when only one item is expanded, but when a second item is expanded, a space is created between the two items that is equivalent in size to the list item rectangle.

While this issue remained unsolved for a long time, the thread was recently bumped by Chovik, who wanted to know if the issue had a solution. Vineet returned to the thread and suggested that Chovik could try playing around with repositioning the ExpanderView elements, using the stack panels and grids to fine-tune. In his own case what worked for him was repositioning the ExpanderView.Header tag and also adding a new ExpanderView.Expander Template. This he backs with a sample code.

We decided to feature this thread to illustrate that it might be worth bumping an old thread even if it hasn’t been resolved, because sometimes the solution has already been identified.

See About Featured Discussion Board Posts for more information.

Keep those interesting questions coming!

Record a video of the filtered camera source

The Featured Discussion Board Post this week is Record a video of the filtered camera source started by Reactor15.

Reactor15 wants to know how to record a video of a filtered camera source. Lee McPherson provides him with a code sample in which one can adjust the recording settings for the particular device.

Reactor15 adds that he wants to use the ChromaKeyFilter, but it seemed to have no effect on the video when enabled. He thinks the alpha channel is being ignored. Lee does not think that those video formats (NV12 and YU2) have alpha channels, and clarifies that they use a luminance byte and two or more color bytes to construct an image. He adds that they are neither RGB nor RGBA.

Lee suggests using Blend Filter in combination with ChromaKeyFilter by running the ChromaKeyFilter on the input video, then blending that layer on top of a custom background that can be provided as another IImageConsumer. Reactor15 was able to get it working with a test ColorImageSource for the background, but wants to know how to pass a StorageFileImageSource from C# to C++. Yan Verdavaine clarifies that StorageFileImageSource implements IImageProvider, and hence he could pass it like a property. Reactor15 confirms this to be an acceptable solution.

We featured this discussion to highlight how helpful members of the community sort out issues to their final conclusions.

See About Featured Discussion Board Posts for more information.

Keep those interesting questions coming!

Windows Phone 8.1 Windows.Media.Capture API and Preview Frames

The Featured Discussion Board Post this week is Windows Phone 8.1 Windows.Media.Capture API and Preview Frames started by Oliver Ulm

Oliver finds it quite easy to access preview frames from the camera using the APIs from Windows Phone 8.0. On Windows Phone 8.1, he observes that it cannot be done the same way as in the previous version. He wants to know if there is any way to do this other than the only reference that he has been able to find.

Lee McPherson shares his experience of how he has gone about this by modifying one of the Media Foundation Transforms that exists in the Media Extensions sample for Universal Apps. He reiterates that he wants to share it on the Wiki. Yan Verdavaine refers to the Real Time Filter Demo code sample, which Lee finds to be a good solution.

We featured this discussion because it highlights ways to preview frames in Windows Phone 8.1.

See About Featured Discussion Board Posts for more information.

Keep those interesting questions coming!

Image view undesirably cropped

The Featured Discussion Board Post this week is Image view undesirably cropped started by m.findlay93

m.findlay93 is trying to implement an Image View within a page for a Windows Phone application, but when it is deployed, the image gets cropped. He states his problem and provides a screen grab of the issue faced.

Ratish Philip admits to facing the same problem. When he removes CacheMode=”BitmapCache”, the cropping goes away but the zoom and pan performance is affected. He suspects a size limit to the image and recommends taking a look at the PhotoPage.xaml in the FilterExplorer project on the Nokia Developer Github repository.

Lee McPherson confirms that the size limit does exist. In WP7 it is 2048x2048 and 4096x4096 in WP8. He suggests loading the image using DecodePixenHeight or DecodePixelWidth to reduce the resolution. The drawback of this approach is that one would lose some resolution on zooming. The alternate and cleaner solution would be to use the Nokia Imaging SDK and follow articles in the Wiki that explain how to display high resolution images.

This discussion was selected for featuring because it highlights how it is possible to work around API limitations by using Nokia Imaging SDK for high resolution pictures.

Keep those interesting questions coming!

Virtualizing + FlipView recycling issue

The Featured Discussion Board Post this week is Virtualizing +FlipView recycling problem started by Lee McPherson

Lee is trying to get a preview of a list of images from a zip or rar archive that contains jpeg files from a Windows Phone application. He is facing a problem with the virtualization from the VirtualizingStackPanel inside the FlipView. The pictures show fine the first times but on repeated flips, they seem to show up out of order.

With further investigations, Lee is able to narrow the problem to the internal scrollviewer snapping in the VirtualizingStackPanel. Even replacing the FlipView with an ItemsControl does not help. Lee works around this issue which shows only in WP8, while it works fine in WinRT and 8.1.

Lee credits this workaround to countering some memory management issues. Oliver Ulm expresses curiosity regarding this, to which Lee explains that it was an issue in WP8 with disposing of BitmapImage. This memory was not set free immediately, even when set to null or when GC.Collect was called, which resulted in memory issues when several large images were loaded and unloaded in quick succession. Lee used the workaround to set the source of an already opened BitmapImage with a 1×1 pixel png file to force the major chunk of memory release.

This discussion was selected for featuring because it highlights how innovative ideas lead to overcoming difficult situations when developing apps.

Keep those interesting questions coming!