2013-10-03 67 views
-1

如何通過單擊按鈕清除圖像。我已經使用bt_ClearOnclick從文本框中刪除數據。如何清除按鈕上的圖像點擊

private void btClear_Click(object sender, RoutedEventArgs e) 
    { 
     txtId.Text = String.Empty; 
     txtvalue.Text = String.Empty; 
     image? 

回答

2
private void btClear_Click(object sender, RoutedEventArgs e) 
{ 
    txtId.Text = String.Empty; 
    txtvalue.Text = String.Empty; 
    image.Source = null; 
} 
相關問題