Pro WP8 AppBar management with AppBarUtils
When developing apps for Windows Phone 8, every developer needs to know how to create and manage the App Bar. The problem is you cannot use databindings and/or localization in App bar buttons and menu items, you also cannot bind the colors or enabled state or even use commands bound to the buttons.
Most apps I've seen uses tedious programmatic initialization in code, repetitive entering of same resource values, or even not localized App bar at all. But there is an easy solution - the AppBarUtils library.
With this library you can use databinding for all AppBar properties, use Commands, even use dynamic app bar content for currently selected pivot/panorama item or your own state like logged-in/logged-out user. Let's see, how to do it.
Windows 8 Share Task out-of-sandbox vulnerability
When I was recently developing one Windows 8 app that supports the "Share Contract", I've experienced strange problems when the sharing suddenly stopped working not just in my app, but for all apps launched from my account. I had to log-off and log- in to make it work again. I thought it was just some kind of temporary issue until I discovered that it cause my app. After hour of testing I've pinpointed the actual issue and came to conclusion:
Any Windows 8 app running in sandbox can break the Share Contract for ALL other Windows 8 apps running under the same account, until the user logs off and on again!
Here's the detailed explanation how to do it, it's quite simple, nothing tricky.
Image path databinding in WP8 and Windows 8 apps
I don't like lengthy articles, so let's make it short and easy.
When you are developing Windows Phone 8 or Windows 8 "modern" apps, you surely want to display images in it.
For displaying images the well known Image element is used:
<image Source="imagepath"></image> |
The imagepath can have multiple values, it can be:
- Uri address to image located on the Internet
- path to image located in app resources/app installation package
- path to image located in app isolated storage
The interesting point is that I've discovered only today that it is actually possible in WP8 apps to display images located in isolated storage directly just by defining the Source, without any loading to Stream and BitmapSource. That's right, even if you search on StackOverflow or on MSDN how to display images located in isolated storage using path in WP8, they tell you it's not possible.
Yes, it is possible, and the whole magic it so use absolute image path using the StorageFile.Path property. Now you know the secret, but let's check it in detail.
Pro Live Tiles for Windows Phone
In this short article I'll show you the most interesting way, how to create custom Live Tiles using generated Png images.
Windows 8 Cloud Comics Reader
My upcoming application for Windows 8 called "Cloud Comics Reader" is already in development and I'm happy to share with you first information and screenshots.
The application Cloud Comics Reader could be described as "Advanced RSS reader for various web comics sources" - It downloads automatically new strips from well knows web comics pages like Garfield, XKCD, PhdComics, Geek And Poke, and others, and shows these comics strips in comfortable way. Currently it shows latest strips in overview or in full screen mode with simple swipe gesture browsing.
Application is currently in early beta phase - the application logic is getting better each day, new features are being added and also feedback from various testers is being put into consideration. The final feature set is not yet known, but you can surely expect these goodies:
- Live Tile and lock screen notification about new comics' strips for favorite comics' sources
- Transparent Image caching for off-line viewing
- Implementation of full Share and Search contracts
- Semantic Zoom, Flip View and other standard Windows 8 UI features
- Mechanism for adding new comics sources using in-app updates
- and lot more
But that's not all - together with Windows 8 app there is also new Windows Phone 7 application with almost same feature set in development. This app for Windows Phone should be ready in July/August.
And here are the promised screenshots, let me know, what do you think
Windows 8 dev, Day 0. – The Basics
If you want to start developing apps for Windows 8, you surely need to know some basics. First of all it's essential to install Windows 8 Release Preview, Visual Studio 2012 RC and also Blend 5 RC. You can't develop Windows 8 Metro apps in Windows 7 or older, or in Visual Studio 2012 or older.
Optionally you can install one of my favorite tools: ReSharper EAP 7 for Visual Studio 2012. It's still in beta quality, but it's definitely better than nothing.
Once you have all this installed, you should probably start reading some stuff about actual Windows 8 Metro app development. I expect you already have some knowledge about creating classic .NET or Silverlight applications in C#, so I won't cover these basic steps. First of all buy this excellent e-book and read it: Programming Windows 6th Edition, by Charles Petzold, it's about 300 pages long, so nothing you can't finish in one weekend
It contains thorough information about XAML and WinRT basics, how to work with layout, Framework Elements, Containers, interactive Controls, DataBinding, Events, etc. Together with some discount codes it costs less than $20. This book also contains lot of code samples you can try on your PC, you can alter them and watch what happens.
Together with studying this book you can also start browsing through MSDN pages related to WinRT programing. Give it at least day or two crawling through these archives, reading materials about Metro design principles, Windows 8 app design, application lifetime, contracts, capabilities, etc. Don't forget also to download couple of actual Windows 8 applications from current Windows Store and use them to know, how they actually work and behave. Don't underestimate this part of development, for creating successful and good liking apps it's essential to know how these app should look like.
So much for theory, the next chapter will be devoted to actual problems and issues I've discovered during my Windows 8 app development/porting from WP7.
Long time no see!
It was almost year ago since when I wrote my last article here. It was in Summer 2011 when I was trying my first Windows Phone development steps, testing WP7.5 Mango beta on my HTC HD7 and plannig to port Fish Fillets to this platform. Lot of stuff happened since then. Right now I got almost 10 apps published in Windows Phone Marketplace and more than 100 000 downloads, not bad I dare to say
I have also just recently started developing Windows 8 Metro applications - it's a whole new platform, not yet stabilized, but it's quite tempting to be one of first publishers on Windows Store, isn't it? In the upcoming days I'll try to collect and write down all my thoughts and discoveries about development for this platform. So stay tuned for lot of useful tips, tricks and hints you might need to know, if you plan to dive into this platform as well.
HTC HD7, Windows Phone 7 + Mango, 2/2
V mé první části minirecenze jsem popsal základní parametry telefonu HTC HD7 a systému Windows Phone 7. V druhé části se budu věnovat vestavěným aplikacím a funkcím, a zaměřím se také na změny, které přínáší chystaná aktualizace Mango.
HTC HD7, Windows Phone 7 – recenze 1/2
Asi tak před čtvrt rokem jsem si koupil nový telefon značky HTC HD7 se systémem Windows Phone 7, o kterém bude tato mini recenze.
Ještě před zakoupením jsem určitou dobu řešil, s jakým systémem by měl můj nový stroj být - jedno jsem věděl jistě, měl by to být dotykový smartphone, ať nejsem pozadu za dobou, že
Rozhodoval jsem se mezi Androidem a právě Windows Phone 7, ale WP7 platforma nakonec výhrála - důvodem byla především výrazně nižší cena přístrojů ( 7500 Kč vs 13000 Kč za prakticky stejnou výbavu), chuť experimentovat a také příslib velké aktualizace, která na podzim přínese většinu chybějících vlastností. Inu koupil jsem si za 7,5 tisíce telefon HTC HD7 - je to asi po deseti letech můj první telefon jiné značky než (Sony) Ericsson.
Creating ‘select multiple’ element in IE6 using jQuery
I was facing recently strange problem with creating <select> tag with 'multiple' attribute in IE6. Normally it's done using $("<select>").attr("multiple", true), but this does not work in IE6 - the crated select element was simple every time, without multiple choices. Setting 'multiple' attribute in IE6 programatically just doesn't work. I spent lot of time finding some workaround, but the solution I discovered is pretty simple, just use this object constructor:
$("<select multiple='multiple'>")
It's not 100% clean solution, but it works in IE6 and that's important.
If you know better solution, you might update the jQuery I created for this issue: http://bugs.jquery.com/ticket/9231




