Got WPF version work

This commit is contained in:
Vova
2024-01-18 17:42:44 +02:00
parent df51ee3ad6
commit 10b4146772
64 changed files with 866 additions and 411 deletions
+12 -2
View File
@@ -1,6 +1,6 @@
using System.Windows.Input;
namespace TV_Player
namespace TV_Player.MAUI
{
public class MainViewModel : ObservableViewModelBase
{
@@ -22,7 +22,17 @@ namespace TV_Player
private void OnItemSelected()
{
var navigation = (INavigation)Application.Current.MainPage.Navigation;
var programPageViewModel = new ProgramViewModel(SelectedItem);
// Create a new SecondPage and set its BindingContext to the ViewModel
var programPage = new ProgramPage
{
BindingContext = programPageViewModel
};
// Navigate to the OtherPage
navigation.PushAsync(programPage);
}
}
}