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 🙂

Maximum number of lines for a Wrap TextBlock

Update (for UWP) In UWP Apps you don’t need this and can use the TextBlock property MaxLines (see MSDN) Original Answer: If you have a specific LineHeight you can calculate the maximum height for the TextBlock. Example: TextBlock with maximum 3 lines <TextBlock Width=”300″ TextWrapping=”Wrap” TextTrimming=”WordEllipsis” FontSize=”24″ LineStackingStrategy=”BlockLineHeight” LineHeight=”28″ MaxHeight=”84″>YOUR TEXT</TextBlock> This is all that … Read more

Javac is not found

As far as I can see you have the JRE in your PATH, but not the JDK. From a command prompt try this: set PATH=%PATH%;C:\Program Files (x86)\Java\jdk1.7.0_17\bin Then try javac again – if this works you’ll need to permanently modify your environment variables to have PATH include the JDK too.

WinRT and WPF in Windows 8

WinRT is a replacement for the Winapi. The api is native, very unlike WPF that runs as a layer on top of the CLR. It certainly resembles WPF, part of what causes confusion. It adopted the metadata format of managed code, replacing type libraries of old. And uses XAML for UI designs, much like WPF, … Read more