In this article: https://msdn.microsoft.com/en-us/library/windows/apps/jj206957%28v=vs.105%29.aspx there is shown a method to clip an image to ellipse, but when I copy that to my project I get an error sugesting that I cannot use ellipse geometry because expected type is "RectangleGeometry". I am building a Windows Phone 8 app.
Is there something wrong with the article or am I missing something?
My xaml code sample:
<Border BorderThickness="1" BorderBrush="AliceBlue">
<Grid Margin="{StaticResource GridMargin}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="1.5*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Stretch="Uniform" Source="{Binding Photo}">
<Image.Clip>
<EllipseGeometry RadiusX="100" RadiusY="100" Center="225,175"/>
</Image.Clip>
</Image>
<Grid Grid.Column="1" Margin="{StaticResource SmallGridMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="1.5*"></RowDefinition>
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="1*"></RowDefinition>
</Grid.RowDefinitions>
<Viewbox Stretch="Uniform" Grid.Row="0">
<TextBlock Text="{Binding BookAuthor}"></TextBlock>
</Viewbox>
<Viewbox Stretch="Uniform" Grid.Row="1">
<TextBlock Text="{Binding BookTitle}"></TextBlock>
</Viewbox>
<Viewbox Stretch="Uniform" Grid.Row="2">
<TextBlock Text="{Binding Id}"></TextBlock>
</Viewbox>
</Grid>