I have an full screen image using this code:
<phone:PhoneApplicationPage
x:Class="solution.FullScreenViewer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
<Image Name="img" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"Stretch="Uniform"/>
</phone:PhoneApplicationPage>
This is just a part of an bigger project. I wanted to implement te feture to open an image in full screen after clicking on it so I made another Page with just one image and nothing else. I am loading the image from C# using this code:
protected override void OnNavigatedTo(NavigationEventArgs e)
{
string context = this.NavigationContext.QueryString["context"];
img.Source = new BitmapImage(new Uri(context, UriKind.RelativeOrAbsolute));
base.OnNavigatedTo(e);
}
Now I would like to add an option to zoom the picture, but I don't know how. I have tried too Google it but the only thing I found was using a ZoomMode in a ScroolViewer which is not working for me (it says that the member ZoomMode is not recognized).
Is there any other solution to zoom in?