using System.Windows;

namespace _5_WPF样式和行为_1样式基础;

/// <summary>
///     Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
    }

    private void MyButton_OnClick(object sender, RoutedEventArgs e)
    {
        var tryFindResource = (Style)BunnyButton.TryFindResource("BigFontButtonStyle");

        Console.WriteLine(tryFindResource);

        if (tryFindResource != null) MyButton.Style = tryFindResource;
    }
}