Created
October 24, 2019 02:36
-
-
Save IntegerMan/e0eaf832ef5e032a80adb227db321784 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid Margin="10" Background="Green"> | |
<Image Source="Grass.png" Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"></Image> | |
<Viewbox Stretch="Uniform"> | |
<Border BorderThickness="1" BorderBrush="DarkGreen"> | |
<ItemsControl ItemsSource="{Binding Actors}" Width="130" Height="130"> | |
<ItemsControl.ItemTemplate> | |
<ItemContainerTemplate> | |
<Border BorderBrush="Black" BorderThickness="1"> | |
<Image Source="{Binding ImagePath}" Width="10" Height="10" Stretch="Fill"></Image> | |
</Border> | |
</ItemContainerTemplate> | |
</ItemsControl.ItemTemplate> | |
<ItemsControl.ItemsPanel> | |
<ItemsPanelTemplate> | |
<Canvas></Canvas> | |
</ItemsPanelTemplate> | |
</ItemsControl.ItemsPanel> | |
<ItemsControl.ItemContainerStyle> | |
<Style TargetType="ContentPresenter"> | |
<Setter Property="Canvas.Left" Value="{Binding PosX}" /> | |
<Setter Property="Canvas.Top" Value="{Binding PosY}" /> | |
</Style> | |
</ItemsControl.ItemContainerStyle> | |
</ItemsControl> | |
</Border> | |
</Viewbox> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment