I realized the same functions as in prev WPF application