Windows 8 Image UniformFill centered

I managed to solve my problem, I made the image larger than the container it was placed in and vertical aligned it in the center. <Grid HorizontalAlignment=”Left” Width=”250″ Height=”125″> <Image Source=”/url/to/image.jpg” Stretch=”UniformToFill” Height=”250″ Margin=”0″ VerticalAlignment=”Center”/> </Grid> The overflow of the image was invisible 🙂

Do Windows 8 Store Apps (Metro) run in Windows 7 or XP?

What new things needed to run Metro Apps in Windows XP or Windows 7 A virtual machine of Windows 8. Metro apps currently don’t run on Windows 7, and definitely don’t on Windows XP. According to this thread, it’s difficult but might happen eventually: Keep your eyes out on future Channel 9 videos and on … Read more

Are Click, Tapped, and PointerPressed synonymous in WinRT-XAML?

Click is there for backwards compatibility, and is essentially the same as Tapped. Tapped is a “high level gesture” that will translate automatically to a click, tap, pen press, etc. and is what I would recommend to use. PointerPressed is not what you want. Here’s why: if I press and hold, the PointerPressed event will … Read more

System.Net.Http.HttpClient vs Windows.Web.Http.HttpClient – What are the main differences?

Windows.Web.Http is a WinRT API available in all the WinRT programming languages supported: C#, VB, C++/CX and JavaScript. This enables the option to write the same code in the language of your choice. System.Net.Http is a .NET API, and it is only available for C# and VB developers. Windows.Web.Http advantages WinRT APIs are written in … Read more

ListView ItemTemplate 100% width

I got it. Setting the ListView.ItemContainerStyle with a HorizontalContentAlignment setter makes the trick. I.e.: <ListView x:Name=”questionsView” Background=”{StaticResource ApplicationPageBackgroundThemeBrush}”> <ListView.ItemTemplate> <DataTemplate> <Border Background=”BlueViolet”> <Grid HorizontalAlignment=”Stretch” Margin=”0″> <TextBlock Text=”{Binding}” /> <TextBlock HorizontalAlignment=”Right”>16 minutes ago</TextBlock> </Grid> </Border> </DataTemplate> </ListView.ItemTemplate> <ListView.ItemContainerStyle> <Style TargetType=”ListViewItem”> <Setter Property=”HorizontalContentAlignment” Value=”Stretch” /> </Style> </ListView.ItemContainerStyle> </ListView>

Retrieve the Current App version from Package

Here’s what you can do to retrieve the version in code: using Windows.ApplicationModel; public static string GetAppVersion() { Package package = Package.Current; PackageId packageId = package.Id; PackageVersion version = packageId.Version; return string.Format(“{0}.{1}.{2}.{3}”, version.Major, version.Minor, version.Build, version.Revision); } Reference: http://www.michielpost.nl/PostDetail_67.aspx

tech