0
所以我有一個按鈕,其中背景需要匹配一個RadioButton前景色。 我已經編輯按鈕的模板一輪有其邊角,價值標籤在這裏:我如何匹配一個按鈕的背景顏色與另一個項目的前景
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundColor}"/>
</ObjectAnimationUsingKeyFrames>
我不知道是什麼改變,我甚至試圖改變它時,按鈕像這樣按下:
private void seeWhy_Click(object sender, RoutedEventArgs e)
{
Button button = sender as Button;
button.Background = checkedRadioButton.Foreground;
NavigationService.Navigate(new Uri("/quiz.xaml", UriKind.Relative));
}