Advertisement
Guest User

Untitled

a guest
May 26th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. <DataTemplate x:Key="PhotoTemplate"
  2.                           DataType="{x:Type l:Photo}">
  3.                 <Button Command="{Binding OpenPhotoCommand}">
  4.                     <Button.Template>
  5.                         <ControlTemplate>
  6.                             <Image Margin="0,10"
  7.                                    Source="{Binding Source}"
  8.                                    MaxHeight="300"
  9.                                    MaxWidth="300"
  10.                                    Width="{Binding ExpectedWidth}"
  11.                                    Height="{Binding ExpectedHeight}"
  12.                                    Stretch="Uniform"
  13.                                    x:Name="Image"
  14.                                    RenderOptions.BitmapScalingMode="HighQuality"/>
  15.                         </ControlTemplate>
  16.                     </Button.Template>
  17.                 </Button>
  18.             </DataTemplate>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement