public GenreUserControlVM(Entertainment.Type?type = null) { GenreTypesComboBoxVisibility = Visibility.Visible; AddButtonVisibility = Visibility.Visible; EditButtonVisibility = Visibility.Visible; DeleteButtonVisibility = Visibility.Visible; if (type != null) { _selectedType = EntertainmentVM.EntertainmentTypeToUkrString((Entertainment.Type)type); } Genre[] genres = Genre.GetRandomFirstTen(type); if (genres != null) { foreach (var genre in genres) { _genreCollection.Add(new GenreVM(genre)); } } Logger.Info("GenreUserControlVM.GenreUserControlVM", "Екземпляр GenreUserControlVM створений."); }