I’d like to set textbox content to the current date and time.
So, it’s:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
date_TextBox.Text = DateTime.Now.ToString(CultureInfo.InvariantCulture);
}
}
but how to refresh it each second?
Help, please!
You can use the DispatcherTimer to fire an event every second to update the textbox