Loading App.xaml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:JuanLog" StartupUri="Views/MainWindow.xaml"> StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> Loading JuanLog.csproj +10 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,19 @@ <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <UseWPF>true</UseWPF> <ApplicationIcon>Resources\JuanLogIco.ico</ApplicationIcon> </PropertyGroup> <ItemGroup> <Folder Include="Models\" /> <Folder Include="ViewModels\" /> <Content Include="Resources\JuanLogIco.ico" /> </ItemGroup> <ItemGroup> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" /> <PackageReference Include="Dapper.SimpleCRUD" Version="2.3.0" /> <PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" /> </ItemGroup> </Project> Views/MainWindow.xaml→MainWindow.xaml +3 −4 Original line number Diff line number Diff line Loading @@ -3,10 +3,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:JuanLog" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> Title="MainWindow" Height="450" Width="800" xmlns:local="clr-namespace:JuanLog"> </Grid> <ContentControl Name="content" Content="{Binding CurrentControl}"></ContentControl> </Window> Views/MainWindow.xaml.cs→MainWindow.xaml.cs +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using JuanLog.ViewModels; namespace JuanLog { Loading @@ -19,6 +20,7 @@ namespace JuanLog public MainWindow() { InitializeComponent(); DataContext = new MainWindowViewModel(); } } } No newline at end of file Messages/ShowHomepageMessage.cs 0 → 100644 +18 −0 Original line number Diff line number Diff line using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Messaging.Messages; namespace JuanLog.Messages { public class ShowHomepageMessage : ValueChangedMessage<object?> { public ShowHomepageMessage() : base(null) { Debug.WriteLine("going home, message sent"); } } } Loading
App.xaml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:JuanLog" StartupUri="Views/MainWindow.xaml"> StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> Loading
JuanLog.csproj +10 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,19 @@ <Nullable>enable</Nullable> <ImplicitUsings>enable</ImplicitUsings> <UseWPF>true</UseWPF> <ApplicationIcon>Resources\JuanLogIco.ico</ApplicationIcon> </PropertyGroup> <ItemGroup> <Folder Include="Models\" /> <Folder Include="ViewModels\" /> <Content Include="Resources\JuanLogIco.ico" /> </ItemGroup> <ItemGroup> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" /> <PackageReference Include="Dapper.SimpleCRUD" Version="2.3.0" /> <PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" /> </ItemGroup> </Project>
Views/MainWindow.xaml→MainWindow.xaml +3 −4 Original line number Diff line number Diff line Loading @@ -3,10 +3,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:JuanLog" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> Title="MainWindow" Height="450" Width="800" xmlns:local="clr-namespace:JuanLog"> </Grid> <ContentControl Name="content" Content="{Binding CurrentControl}"></ContentControl> </Window>
Views/MainWindow.xaml.cs→MainWindow.xaml.cs +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using JuanLog.ViewModels; namespace JuanLog { Loading @@ -19,6 +20,7 @@ namespace JuanLog public MainWindow() { InitializeComponent(); DataContext = new MainWindowViewModel(); } } } No newline at end of file
Messages/ShowHomepageMessage.cs 0 → 100644 +18 −0 Original line number Diff line number Diff line using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Messaging.Messages; namespace JuanLog.Messages { public class ShowHomepageMessage : ValueChangedMessage<object?> { public ShowHomepageMessage() : base(null) { Debug.WriteLine("going home, message sent"); } } }