25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
![]() |
<Window x:Class="CzokoŚmieciarka.WPF.MainWindow"
|
||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF"
|
||
|
xmlns:models="clr-namespace:CzokoŚmieciarka.WPF.Models"
|
||
|
mc:Ignorable="d"
|
||
|
Title="MainWindow" Height="450" Width="800">
|
||
|
<ItemsControl ItemsSource="{Binding Tiles}" BorderBrush="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}">
|
||
|
<ItemsControl.Resources>
|
||
|
<DataTemplate DataType="{x:Type models:Tile}">
|
||
|
<Grid Background="{Binding Background}">
|
||
|
<TextBlock Text="{Binding Data}"></TextBlock>
|
||
|
</Grid>
|
||
|
</DataTemplate>
|
||
|
</ItemsControl.Resources>
|
||
|
<ItemsControl.ItemsPanel>
|
||
|
<ItemsPanelTemplate>
|
||
|
<UniformGrid Rows="{Binding Rows}" Columns="{Binding Columns}" Margin="10" Background="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"/>
|
||
|
</ItemsPanelTemplate>
|
||
|
</ItemsControl.ItemsPanel>
|
||
|
</ItemsControl>
|
||
|
</Window>
|