I was working on transforming a Windows Store app into an Universal app so that it worked not just for Windows Store but also for Windows Phone. When you do this two new projects are added to the solution. One of them is a special one, called shared project that you can use to keep…
Category: XAML
Working with the Settings Charm for Windows 8.1 Store Applications
Windows 8 features a Settings charm to display both application (the top part) and system (the bottom part) settings (you get it from swiping from the side of the screen). The system provides two entry points, Permissions and Rate and Review, the later only for applications installed through the store. You can customize the settings…
Render the screen of a Windows Store App to a bitmap in Windows 8.1
In WPF, Silverlight and Windows Phone it is possible to render a visual object into a bitmap using the RenderTargetBitmap. This functionality, that I find pretty basic, was not available for Windows Store applications. Fortunately, Windows 8.1 provides that functionality for Windows Store applications too, through the same RenderTargetBitmap class. There are some limitations though:…
C++, WinRT and Partial Classes
Partial classes are finally available to C++. Sort of. It’s not part of the new C++11 standard, it’s part of the C++/CX language developed by Microsoft for targeting WinRT on Windows 8. Partial classes mean that you can define a class spanned across several files. Why is this great? Because it allows developers and automatic…
Reference a XAML From Another Project
When you create a WPF application, the start-up window is by default one from the same project (by default called Window1.xaml). < Application x:Class=”WpfApplication1.App” xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” StartupUri=”Window1.xaml” > < Application.Resources > < /Application.Resources > < /Application > But what if you want to use a window from another project (class library)? The pack URI scheme,…
WPF tab control
A WPF TabControl contains multiple items (TabItem), just like any tab control, and adding new tabs is quite easy. The following example shows a tab control with two tab items. However, when you try adding child controls to a TabItem you’ll notice that you can actually add one single child. The following XAML code yields…