2
Microsoft Surface SDK를 사용하고 있으며 선택한 항목의 스타일을 지정하는 데 문제가 있습니다.SurfaceListBox 선택한 항목 템플릿
<s:SurfaceListBox Name="listy" Background="Transparent"
FontSize="50" Foreground="White" BorderBrush="White"
HorizontalContentAlignment="Center"
Margin="5,5,5,100" SelectionMode="Single">
<s:SurfaceListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Foreground="White" />
</DataTemplate>
</s:SurfaceListBox.ItemTemplate>
<s:SurfaceListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<ContentPresenter HorizontalAlignment="Center" />
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="Grey" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</s:SurfaceListBox.ItemContainerStyle>
</s:SurfaceListBox>
을하지만 실패하고 모든 인터넷이에 대한 튜토리얼이 없습니다 - 내가 시간 검색은 :
지금까지 내가 가지고있다.
도움 주셔서 감사합니다.
봐에
Border
에ContentPresenter
을 감고을 대상으로 할 수있다. 동일한 코드가 Surface에서 작동합니다. –