Skip to content

Commit

Permalink
Fix VSIX Template
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost1372 committed Dec 8, 2024
1 parent 4a9ea64 commit cbe967b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<ItemGroup>
<Compile Include="Common\Constants.cs" />
<Compile Include="Common\Extensions\DictionaryExtension.cs" />
<Compile Include="Common\Helper.cs" />
<Compile Include="Common\NugetClientHelper.cs" />
<Compile Include="Common\Options\ColorsDicOption.cs" />
<Compile Include="Common\Options\ConfigCodes.cs" />
Expand Down
5 changes: 2 additions & 3 deletions VSIX/DevWinUI_Template/WinUIApp-NavigationView/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ public partial class App : Application
{
public static Window MainWindow = Window.Current;
public IThemeService ThemeService { get; set; }
public IJsonNavigationService NavigationService { get; set; }
public JsonNavigationService NavService { get; set; }
public new static App Current => (App)Application.Current;
public IJsonNavigationService GetNavService => NavigationService;
public IThemeService GetThemeService => ThemeService;

public App()
{
this.InitializeComponent();
NavigationService = new JsonNavigationService();
NavService = new JsonNavigationService();
}

protected $OnLaunchedAsyncKeyword$override void OnLaunched(LaunchActivatedEventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
HeaderOverlayImage="{ThemeResource HeaderCover}"
HeaderSubtitleText="{x:Bind dev:ProcessInfoHelper.Version}"
HeaderText="{x:Bind dev:ProcessInfoHelper.ProductName}"
JsonNavigationService="{x:Bind local:App.Current.GetNavService}" />
JsonNavigationService="{x:Bind local:App.Current.NavService}" />
</Page>

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public MainPage()
this.InitializeComponent();
App.MainWindow.ExtendsContentIntoTitleBar = true;
App.MainWindow.SetTitleBar(AppTitleBar);
App.Current.GetNavService()
App.Current.NavService
.Initialize(NavView, NavFrame, NavigationPageMappings.PageDictionary)
.ConfigureJsonFile("Assets/NavViewMenu/AppData.json")$ConfigDefaultPages$
.ConfigureTitleBar(AppTitleBar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
VerticalScrollBarVisibility="Auto">
<StackPanel Margin="10"
dev:PanelAttach.ChildrenTransitions="Default"
dev:SettingsNavigationAttach.JsonNavigationService="{x:Bind local:App.Current.GetNavService}"
dev:SettingsNavigationAttach.JsonNavigationService="{x:Bind local:App.Current.NavService}"
Spacing="5">
$SettingsCards$
</StackPanel>
Expand Down

0 comments on commit cbe967b

Please sign in to comment.