Files
YMhut-box-C-/参考/wpfui-main/samples/Wpf.Ui.Demo.SetResources.Simple/Views/Pages/DashboardPage.xaml.cs
T
2026-07-06 23:05:40 +08:00

35 lines
969 B
C#

// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.
using System.Windows;
namespace Wpf.Ui.Demo.SetResources.Simple.Views.Pages;
/// <summary>
/// Interaction logic for DashboardPage.xaml
/// </summary>
public partial class DashboardPage
{
private int _counter = 0;
public DashboardPage()
{
App.ApplyTheme(this);
DataContext = this;
InitializeComponent();
CounterTextBlock.SetCurrentValue(System.Windows.Controls.TextBlock.TextProperty, _counter.ToString());
}
private void OnBaseButtonClick(object sender, RoutedEventArgs e)
{
CounterTextBlock.SetCurrentValue(
System.Windows.Controls.TextBlock.TextProperty,
(++_counter).ToString()
);
}
}