如何将 app.xaml 中的样式设置为 c# 中的按钮?
app.xaml 中有一种按钮样式,我想在 c# 中的按钮中使用它。
这是我的按钮代码。
Button deleteButton = new Button();
deleteButton.Background = new ImageBrush
{
ImageSource ="Delete2.png"
};
deleteButton.Height = 70;
deleteButton.Width = 70;
deleteButton.HorizontalAlignment = HorizontalAlignment.Left;
deleteButton.VerticalAlignment = VerticalAlignment.Bottom;
deleteButton.Margin = new Thickness(0,10,0,-5);
deleteButton.BorderBrush = null;
deleteButton.Visibility = Visibility.Collapsed;
deleteButton.Click += new RoutedEventHandler(ItemDeleteButton_Click);
deleteButton.Tag = tag;
deleteButton.Style = ?????????????????