From b4f03a658925de4ec833f62b7bff29e39797d096 Mon Sep 17 00:00:00 2001 From: tohAdam <139485068+tohAdam@users.noreply.github.com> Date: Mon, 7 Apr 2025 16:10:18 +0800 Subject: [PATCH] feat: --- HospitalApp/SettingsPageView.xaml.cs | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 HospitalApp/SettingsPageView.xaml.cs diff --git a/HospitalApp/SettingsPageView.xaml.cs b/HospitalApp/SettingsPageView.xaml.cs new file mode 100644 index 0000000..0011f13 --- /dev/null +++ b/HospitalApp/SettingsPageView.xaml.cs @@ -0,0 +1,57 @@ +// In your code-behind file (SettingsPageView.xaml.cs) +using Avalonia.Controls; +using Avalonia.Interactivity; + +namespace HospitalApp.Views +{ + public partial class SettingsPageView : UserControl + { + public SettingsPageView() + { + InitializeComponent(); + + // Hook up the General button click event + GeneralButton.Click += OnGeneralButtonClick; + } + + private void OnGeneralButtonClick(object sender, RoutedEventArgs e) + { + // Get the main content control (you'll need to add an x:Name to your content area) + ContentControl mainContent = this.FindControl("MainContent"); + + // Create a new instance of the patient profile view + PatientProfileView patientView = new PatientProfileView(); + + // Set the content to the patient profile view + mainContent.Content = patientView; + } + } +}// In your code-behind file (SettingsPageView.xaml.cs) +using Avalonia.Controls; +using Avalonia.Interactivity; + +namespace HospitalApp.Views +{ + public partial class SettingsPageView : UserControl + { + public SettingsPageView() + { + InitializeComponent(); + + // Hook up the General button click event + GeneralButton.Click += OnGeneralButtonClick; + } + + private void OnGeneralButtonClick(object sender, RoutedEventArgs e) + { + // Get the main content control (you'll need to add an x:Name to your content area) + ContentControl mainContent = this.FindControl("MainContent"); + + // Create a new instance of the patient profile view + PatientProfileView patientView = new PatientProfileView(); + + // Set the content to the patient profile view + mainContent.Content = patientView; + } + } +}