새로운 Universal Windows 플랫폼 응용 프로그램에서 ItemsControl의 배경을 설정하려고합니다. 하지만 아무 것도하지 않는 것 같습니다. 내가 VS 템플릿 제작 한 유일한 변화는 지금과 같이 보입니다에서 MainPage.xaml에 있습니다ItemControl 배경색
<Page
x:Class="UWPPlayground.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWPPlayground"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" x:Name="Hello">
<Grid Background="Blue">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*">
</ColumnDefinition>
<ColumnDefinition Width="*">
</ColumnDefinition>
</Grid.ColumnDefinitions>
<ItemsControl Grid.Row="0" Grid.Column="0" Width="60" Height="30" Foreground="Wheat" Background="White">
<TextBlock Text="Hello World!"></TextBlock>
<TextBlock Text="Can you see this?"></TextBlock>
</ItemsControl>
<Grid Grid.Row="0" Grid.Column="1" Background="Purple"></Grid>
</Grid>
</Page>
결과는 다음과 같습니다. ItemsControl의 Foreground 속성은 TextBlock에 밀색 텍스트가 있으므로 잘 작동하는 것 같습니다. 작은 크기의 컨트롤 때문에 예상대로 텍스트가 잘립니다. 그러나 배경은 표시되지 않습니다. 내가 뭘 놓치고 있니?