Skip to content

Add splashscreen#25

Closed
Lamparter wants to merge 4 commits intoryanlua:mainfrom
Lamparter:add-splashscreen
Closed

Add splashscreen#25
Lamparter wants to merge 4 commits intoryanlua:mainfrom
Lamparter:add-splashscreen

Conversation

@Lamparter
Copy link

Description

Makes splashscreen not optional

Related Issues

https://discord.com/channels/714581497222398064/1273778948903403520/1273778948903403520

Changes Made

  • Added uap5 xml schematics to manifest
  • Stated that the splash screen is not optional

Checklist

  • I have tested these changes thoroughly.
  • I have reviewed my code for any potential errors or issues.
  • I have followed the code style guidelines for this project.

Additional Notes

All of these code changes completed on my phone! 😄

Code of Conduct

By submitting this issue, I agree to follow the Code of Conduct.

Signed-off-by: Lamparter <notlamparter@outlook.com>
Signed-off-by: Lamparter <notlamparter@outlook.com>
@Lamparter Lamparter requested a review from ryanlua as a code owner August 17, 2024 08:22
@Lamparter
Copy link
Author

@ryanlua please use the squash and merge feature because I would like to get credit for this pr

@ryanlua
Copy link
Owner

ryanlua commented Aug 17, 2024

I took a look and tried to test it myself, but it still shows black before the UI loads?

image

@Lamparter
Copy link
Author

I took a look and tried to test it myself, but it still shows black before the UI loads?

I may have mistyped something - @ryanlua I'm on holiday right now when I get back I'll take a closer look

@Lamparter Lamparter marked this pull request as draft August 22, 2024 16:05
@ryanlua
Copy link
Owner

ryanlua commented Oct 22, 2024

@Lamparter Are you still working on this or can I close this stale PR?

@Lamparter
Copy link
Author

Yeah I don't think I really understand how to add the splashscreen; it's strange because this line of code usually adds it. Perhaps that's only on UWP apps 😅

@Lamparter Lamparter closed this Oct 22, 2024
@Lamparter
Copy link
Author

Lamparter commented Oct 22, 2024

This might work:

protected override void OnLaunched(LaunchActivatedEventArgs args)
{
    base.OnLaunched(args);

    Frame rootFrame = Window.Current.Content as Frame;

    if (rootFrame == null)
    {
        rootFrame = new Frame();
        rootFrame.NavigationFailed += OnNavigationFailed;
        Window.Current.Content = rootFrame;
    }

    if (rootFrame.Content == null)
    {
        rootFrame.Navigate(typeof(MainPage), args.Arguments);
    }

    Window.Current.Activate();
}

That's how I have it in some apps. I'll take a look later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants