Got WPF version work
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user