Answer the question
In order to leave comments, you need to log in
How can I change the contents of the Label so that it persists after the application is restarted?
Good afternoon, there is a button and a label, I need the name of the label to change when the button is pressed, and when the application is restarted, the label has a new name.
newbie in c#.
did something like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApp3
{
/// <summary>
/// Логика взаимодействия для MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Buttons_Click(object sender, RoutedEventArgs e)
{
lbl.Content = "Проверка";
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question