Skip to content

Commit

Permalink
tentative numero 2 pour repair la navbar
Browse files Browse the repository at this point in the history
la navbar ne fonctionne toujours pas jpp
  • Loading branch information
ABCraft19 committed Aug 25, 2024
1 parent 6de601f commit 2b24884
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
FontWeight="DemiBold" />
</ui:NavigationView.Header>
<ui:NavigationView.MenuItems>
<ui:NavigationViewItem Content="Dashboard" TargetPageType="{x:Type pages:DashWindow}">
<ui:NavigationViewItem Content="Dashboard">
<ui:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="Home24" />
</ui:NavigationViewItem.Icon>
</ui:NavigationViewItem>
<ui:NavigationViewItem Content="Installer" TargetPageType="{x:Type pages:Installation}">
<ui:NavigationViewItem Content="Installer">
<ui:NavigationViewItem.Icon>
<ui:SymbolIcon Symbol="DataHistogram24" />
</ui:NavigationViewItem.Icon>
Expand Down
9 changes: 3 additions & 6 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace MultiTools
{
public partial class MainWindow : Window
{
public MainWindow()
public MainWindow(NavigationPageModel model)
{
InitializeComponent(NavigationPageModel model);
InitializeComponent();

DataContext = model;
Loaded += (_, _) => Dash.Navigate(type(MyDashboardClass));
Loaded += (_, _) => Dash.Navigate(typeof(DashWindow));
// Ensure navigationView (Dash) is properly initialized before attaching the event handler
this.Loaded += (s, e) =>
{
Expand Down Expand Up @@ -42,8 +42,5 @@ private void OnNavigationViewSelectionChanged(object sender, RoutedEventArgs e)
}
}
}

// Remove this property as it is not needed
// public NavigationView navigationView { get; set; }
}
}
11 changes: 7 additions & 4 deletions MultiTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Compile Remove="NewFolder\**" />
<EmbeddedResource Remove="NewFolder\**" />
<None Remove="NewFolder\**" />
<Page Remove="NewFolder\**" />
</ItemGroup>

<ItemGroup>
<Content Include="multi-tools.ico" />
</ItemGroup>
Expand All @@ -30,8 +37,4 @@
<Resource Include="Assets\wpfui-icon-1024.png" />
</ItemGroup>

<ItemGroup>
<Folder Include="NewFolder\" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Pages/installation.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Window
x:Class="MultiTools.Pages.InstallationWindow"
x:Class="MultiTools.Pages.Installation.InstallationWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Expand Down
4 changes: 4 additions & 0 deletions Pages/installation.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public void Install()

public partial class InstallationWindow : Window
{
public InstallationWindow()
{
InitializeComponent();
}

public void Button_PopupWebcam_Click(object sender, RoutedEventArgs e)
{
Expand Down

0 comments on commit 2b24884

Please sign in to comment.