Telerik Forums
UI for WPF Forum
1 answer
47 views

Hi,everyone,

I choose the MaterialTheme for my window and it works as expected after changing  my  MaterialPalette.Palette .  But after using the SplashScreen, the Palette  setting seems to have failed. 

And the Palette  didn‘t work in  SplashScreen either.

 What's wrong  with my steps?

Thank you for your help!

Martin Ivanov
Telerik team
 answered on 20 May 2022
1 answer
784 views

Hi,

When I am using the following code to show a splash screen using the RadSplashScreenManager, with StartupLocation = null, only the top left corner of the window is centered on the screen. I have the same behavior without customizing the SplashScreenDataContext :

            var splashScreenDataContext = (SplashScreenDataContext)RadSplashScreenManager.SplashScreenDataContext;
            splashScreenDataContext.ImageHeight = 300.0;
            splashScreenDataContext.ImageStretch = Stretch.Uniform;
            splashScreenDataContext.ImagePath = "/MyAssembly;component/Resources/MyImage.png";

            RadSplashScreenManager.Show();

In the sample, your are using hard coded sizes (260 and 160) to calculate the StartupLocation of the splash screen :

        private void ShowSplashScreen()
        {
            this.timer.Start();
            Mouse.OverrideCursor = Cursors.Wait;
            this.splashScreenDataContext = RadSplashScreenManager.SplashScreenDataContext as SplashScreenDataContext;
            this.splashScreenDataContext.ImagePath = "/SplashScreen;component/SplashScreen.png";
            this.splashScreenDataContext.IsIndeterminate = false;
            this.splashScreenDataContext.Content = "Loading... 0%";
            this.parentWindow.CanMove = false;
            this.parentWindow.IsEnabled = false;
            if (this.parentWindow.WindowState != System.Windows.WindowState.Maximized)
            {
                var x = this.parentWindow.Left + this.parentWindow.ActualWidth / 2 - 260;
                var y = this.parentWindow.Top + this.parentWindow.ActualHeight / 2 - 160;
                RadSplashScreenManager.StartupPosition = new System.Windows.Point(x, y);
            }

            RadSplashScreenManager.Show();
        }

Hard coding the sizes of the window is obviously not ideal. Instead, the splash window should act like any Window with the property SizeToContent="WidthAndHeight".

Can you help ?

Vladimir Stoyanov
Telerik team
 answered on 26 May 2021
1 answer
287 views

Hi,

 

I am using the RadSplashScreen and I would like to allow the following actions:

- Set splashscreen as not topmost

- Allow to move the splashscreen (no resize, or close, just move)

 

Thank you for your help

Martin Ivanov
Telerik team
 answered on 22 Apr 2021
6 answers
673 views

     Good day,

 

Following the instruction in your "Getting Started" section, after just updating the UI for WPF modules, I created a simple MenuItem under my Menu to test it out. 

The code is rather simple:

private void Loadingtest(object sender, RoutedEventArgs e)
        {
            var dataContext = (SplashScreenDataContext)RadSplashScreenManager.SplashScreenDataContext;
            dataContext.ImagePath = "";
            dataContext.Content = "Loading";
            dataContext.Footer = "Please wait, this might take several minutes";
            dataContext.MouseCursor = Cursors.Wait;
            dataContext.IsProgressBarVisible = true;
            dataContext.IsIndeterminate = true;
            if (!RadSplashScreenManager.IsSplashScreenActive) {

                RadSplashScreenManager.Show();
            Thread.Sleep(7000);
            RadSplashScreenManager.Close();
        }

 

Problem is whenever I click that menuitem it performs the 7 second wait and then flashes the loading screen for a moment before closing it again.

Tried it as well in WindowLoaded event as well as a Rendered event, both do the same things.

Tried to do Dispatcher.Invoke, Dispatcher.BeginInvoke as well as a new Tread with a run. All goes the same way. Both in Debug and Release modes. Also, trying to do something like changing the title in between throws an exception about the running thread not being able to access it, as if the whole execution were moved to a new thread after the SplashScreenManager.Show();

 

Example of the one that causes an error:

 

private void Loadingtest(object sender, RoutedEventArgs e)
        {
            var dataContext = (SplashScreenDataContext)RadSplashScreenManager.SplashScreenDataContext;
            dataContext.ImagePath = "";
            dataContext.Content = "Loading";
            dataContext.Footer = "Please wait, this might take several minutes";
            dataContext.MouseCursor = Cursors.Wait;
            dataContext.IsProgressBarVisible = true;
            dataContext.IsIndeterminate = true;
            if (!RadSplashScreenManager.IsSplashScreenActive) {
                RadSplashScreenManager.Show();

            this.Title = "Title Test";
            Thread.Sleep(7000);
            RadSplashScreenManager.Close();
        }

 

Thanks a bunch!

Vladimir Stoyanov
Telerik team
 answered on 04 Jun 2020
1 answer
230 views

Hi

 

I have a 3 monitor setup.

When my application opens on the first monitor the splash screen is shown on the second one.

Is there a way to control this?

 

/Flemming

Vladimir Stoyanov
Telerik team
 answered on 10 Mar 2020
2 answers
1.5K+ views

Hello,

When I use a RadSplashScreen at the launch of my application, the application's main window doesn't receive focus and appears behind other windows. I've seen a reference to this type of behavior on another thread regarding RadWindow (https://www.telerik.com/forums/mainwindow-losts-focus-after-child-radwindow-is-closed), but the solution there doesn't seem applicable to this control.

I created a sample application (https://github.com/3milio/RadSplashScreenHidingMainWindow) with VS 2017 following your getting started guide. Mind trying it out and seeing if I'm missing a step? For me, when I hit F5 in the debugger to run it the splash screen appears on top of it but then when the main window gets instantiated it hides behind other programs.

Also, when I first cloned the repo and ran it in the debugger it didn't demonstrate this behavior. But any time after that, it did. That includes running it with the Release configuration, as well as simply running the .exe from Windows Explorer.

Thanks,

Emilio

Emilio
Top achievements
Rank 1
 answered on 22 Feb 2020
1 answer
508 views

I created a custom splashscreen usercontrol with a custom viewmodel (as explained in the docs) but when i try to update the values on the viewmodel only the original values are shown and the new values are ignored? how is this possible?

If i used the standard splashscreen it works

Vladimir Stoyanov
Telerik team
 answered on 21 Jan 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?