0
我在我的應用程序中有一個列表框和一個列表框中的按鈕。我將圖像應用於該按鈕(appbar.edit.rest.png圖標)。但是當主題變爲點亮時,圖標不顯示......我應該怎樣做,以便在主題更改時動態更改該圖標。 XAML代碼如下:在Windows Phone 7.1應用程序中動態更改圖像源
<ListBox x:Name="passwordSaferRecordsListBox" ItemsSource="{Binding EntityRecordInfoItems}" Grid.Row="0" Margin="12, 140, 0, 0" FontSize="40" HorizontalAlignment="Center" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid HorizontalAlignment="Stretch" Width="440">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Text="{Binding RecordName}"
FontSize="{StaticResource PhoneFontSizeLarge}"
Grid.Column="0"
VerticalAlignment="Center"/>
<Button
Grid.Column="1"
x:Name="editTaskButton"
BorderThickness="0"
Margin="0"
Click="editTaskButton_Click" DataContext="{Binding}">
<Image Source="appbar.edit.rest.png"></Image>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>