Blog Home  Home Feed your aggregator (RSS 2.0)  
Peter Nowaks Mobile Blog - WindowsPhone7SeriesDevelopment
Windows Phone in the cloud
 
 Tuesday, July 13, 2010

I’ve just stumbled over the method IsolatedStorageFile.GetFileNames("searchPattern”).

Lets take the given code:

try

            {

IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication();

 

                file.CreateFile("test1.txt").Close();

                file.CreateFile("test2.txt").Close();

                file.CreateFile("test3.txt").Close();

                file.CreateFile("test4.txt").Close();

                file.CreateFile("test5.txt").Close();

                file.CreateFile("leer1.txt").Close();

                file.CreateFile("leer2.txt").Close();

                file.CreateFile("leer3.txt").Close();

                file.CreateFile("leer4.txt").Close();

                file.CreateFile("leer5.txt").Close();

 

string[] files = file.GetFileNames();

                files = file.GetFileNames("test*.txt"); //Returns 10 entries, instead of 5

 

            }

catch (IsolatedStorageException ios)

            {

            }

 

This shows that GetFileNames with search patterns fails in CTP and current beta returning in the sample with 10 entries, instead of 5.

If you use the sample including a subfolder, the values returned are correct.

 

SO, forr now, beware using this method on the Isolated Storage base folder.

Tuesday, July 13, 2010 3:58:39 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback

If you still haven’t heard of it: The Visual Studio 2010 Express for Windows Phone Beta has been released yesterday.

For installing this beta version, it is necessary to uninstall the April CTP.

In general it is a good thing to have a VM running the bits, as you can install them fresh. But there are sometimes circumstances that this isn’t possible, which leads a couple of times, that the uninstall fails of several reasons.

Ginny Caughey, as well a Device Application Development MVP, sharred a linkt to the US forums, which gives a few good advices and tipps, how to come around some uninstallation issues. The forum post can be found here.

Thanks Ginny!

Tuesday, July 13, 2010 3:49:51 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
 Wednesday, July 07, 2010

As playing around a bit with the WP7 functionality, I wanted to create a small sample, which loads XAML Elements dynamically into the Page. No magic here.

The XAML fragment to be loaded has been extracted to a file called XamlFragment.xaml. I set in the Properties window of VS 2010  the Build Action to Content and deleted the value for the Custom Tool.

The idea was to package the file withe the XAP file and deploy it, so the SL App could read the file directly.

What I totally forgot about was the fact, that SL Apps have only access  to the Isolated Storage. But the Isolated Storage in fact is a subfolder of the Apps folder, where the XAP files get deployed. So how to access the file?

After searching a bit around I found out, that XNA has the same issue on accessing files like textures etc., which are packed within the XAP.

Therefore the Assembly Microsoft.Xna.Framework contains the static class TitleContainer.

Executing “TitleContainer.OpenStream(‘XamlFragment.xaml’)” returned an object of type stream, which could be accessed by my StreamReader.

(Please keep in mind that this stream is readonly)

 

More info on the TitleContainer class can be found here.

Wednesday, July 07, 2010 10:06:34 AM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
 Thursday, July 01, 2010

Da nun bereits die TechTalk Reihe von Microsoft zum Thema Windows Phone 7 Entwicklung durch ist, freue ich mich umso mehr selbst einen Vortrag zu dem Thema bei der netug Niederrhein halten zu dürfen. Ich freue mich sehr darauf aus dem Nähkästchen der aktuellen CTP erzählen zu können und ein paar nette Samples zeigen zu dürfen.

Datum: Mittwoch, 14. Juli 2010

Zeit: 18:30 - 21:30

Ort: AUTOonline GmbH Informationssysteme

Straße: Hammfelddamm 6

Stadt/Ort: Neuss, Germany

Veranstalter: http://www.netug-niederrhein.de/

 

Ich würde mich freuen, euch vor Ort begrüssen zu dürfen.

Thursday, July 01, 2010 12:30:36 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [2]   Windows Phone 7 series development  |  Trackback
 Monday, June 14, 2010

Am 28.05.2010 findet die dotnet Cologne 2010 in Köln statt.

Die Veranstaltung selbst war einfach nur super. Es hat richtig Spaß gemacht dort den Vortrag zu “Silverlight für Windows Phone 7” halten zu dürfen. Nicht nur, dass der Raum fast überfüllt war, waren die Diskussionen zwischen den Teilnehmern sehr erfrischend.

Leider führte dies jedoch unter anderem auch dazu, dass ich den Stoff leider nicht komplett zeigen konnte. Aus diesem Grund gibt es an dieser Stelle die Slides und Samples zum Download.

Bitte beachtet, dass in den Samples eine Textdatei enthalten ist, welche weitere Informationen bietet.

Weitere Informationen zur dotnet Cologne findet Ihr hier.

PeNo_SL für WP7.zip (557,18 KB)
Monday, June 14, 2010 8:27:15 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0]   Windows Phone 7 series development  |  Trackback
Copyright © 2010 Peter Nowak. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.