1
나는 다음과 같은 목록 상자가 :변경 목록 상자 선택한 항목 전경 7
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,10,0,10">
<TextBlock
Foreground="Black"
Text="{Binding name}"/>
<TextBlock
Foreground="Black"
Text=": "
Visibility="{Binding
Path=name,
Converter={StaticResource ServiceOtherConverter}}"/>
<TextBlock
Foreground="Black"
Text="{Binding amount}"
Visibility="{Binding
Path=name,
Converter={StaticResource ServiceOtherConverter}}"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
을 그리고 내 애플 흰색 배경을 가지고, 그래서 나는 검은 색으로 전경 목록 항목을 설정하고 싶습니다. 그러나 항목을 선택하면 전경이 변경되지 않고 기본 전경이 변경됩니다.
목록 항목을 포어 그라운드로 검은 색으로 변경하지만 선택한 포 그라운드가 여전히 다른 경우 어떻게합니까?
"아이템을 마우스 오른쪽 단추로 클릭"한다는 것은 무엇을 의미합니까? 나는 "Objects and Timeline"의 목록 상자를 오른쪽 클릭 할 수 있지만 항목은 클릭 할 수 없다. – softarn
@softarn -이 같은 것이 당신을 도울 것입니다. http://msdn.microsoft.com/en-us/expression/dd334538.aspx –