Dealing with page resize in Windows Store Applications using Caliburn.Micro

Sunday, March 1, 2015

Windows Store Applications allow the user to change the size of the application and change the the layout to e vertical or horizontal. in order to provide god user experience we want adapt our view to different modes. For instance, showing a grid like view when in Full Horizontal mode and change it a List when we are snapped to side (and look vertical). The examples and guidelines on how to change your view based on the page layout change are around those option: In your page XAML write the representation for both mode and change visibility...

Simple Behavior for Binding to ActualWidth\ActualHeight

Monday, December 22, 2014

There are times when you want two or more elements in your XAML to share the same dimensions, usually you dint want to deal with static sizes and prefer that after an element got its size from the layout, all the other elements will be set to the same size. you can find the real sizes of an element quite easily by looking at its ActualHeight and ActualWidth properties, however those properties doesn’t behave nice with binding and attempting to bind an element to another element ActualWidth\ActualHeight will result in an expected results. to mitigate the problem I created...
no comments

StringSplitterConverter–binding to a part of a string in XAML

Sunday, December 21, 2014

I’m involved in a Windows Store project that needs to deal with localization. I already write a about localization in Windows Store application in January 2013 so you are welcome to read about it. Our Xaml designers came to me the other day with an issue they found irritating. They needed to show some text on the screen that contain both regular text (some as bold, some italic etc.) and hyperlinks and if that’s not enough the text-resource was localized. One way to solve this is to separate the text-resource to multiple parts and store each one independently...
no comments

Dependent DLLs are not copied if referenced only from XAML

Friday, September 19, 2014

I got a nasty exception in my project: A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll Additional information: Could not load file or assembly 'AThirdParty, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. To illusatrate, this how my solution looked like: I have a control library that uses another control library (doesn't matter if in the same solution or from 3rd party).MyControlLibrary reference a control from the AThirdParty dll only in one of its user-controls xaml:<Grid> <aThirdParty:ThirdPartyControl/> </Grid> MyWPFApplication used the user-control from MyControlLibrary inside its...
no comments