"Please wait" Windows in WPF - wpf

I need to create a "please wait" window at the start up of my application, start animation and at the lifetime of app change visibility. I don`t want create explicitly new thread (Maybe ThreadPool or BackgroundWorker).
Any ideas?

WPF has a very nice splash screen class exactly for that: http://www.codeproject.com/Articles/36418/WPF-Splash-Screen.aspx
Here is the quick steps:
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In Solution Explorer, select the image.
Add the image file to the WPF Application project. For more information, see How to: Add Existing Items to a Project.
In the Properties window, click the drop-down arrow for the Build Action property.
Select SplashScreen from the drop-down list
(source here: WPF SplashScreen implementing)

Related

No Resources window .Net Core WPF project in Microsoft Blend 2019

I am having an issue with Blend for Visual Studio 2019 version 16.11.3. When I create a .Net Framework project I can access the Resource Window via the "View" toolbar at the top.
However I seem to be unable to access the same window when the project is using .Net Core.
I am having trouble figuring out where and why the Resources window might be hidden? I want this functionality to make it easier to apply styles using the interface and just drag&dropping styles vs writing them out in xaml.
You could follow the steps below to display the Resources Window menu.
Click Customize... under the Tools menu.
Click Commands and select Menu bar as View.
Click Add Command... ->Select View and Resources Window on the Add Command page and click OK.
Click Close on the Customize page.
Then you could see the Resources Window under the View menu.

Is it possible to make a Window as the SplashScreen for WPF Project

When I use the AddNewItem to add an splash screen to a project, It adds an image file to the project. But I want to know if it is possible to make a Window as the Splash Screen of a WPF project.
I tried to set the BuildAction property of a Window to SplashScreen but the project fails to compile.
The Andy Lang apparently explained to make the splash screen with this single steps.
Please refer
http://www.codeproject.com/Articles/38291/Implement-Splash-Screen-with-WPF
You need to create a normal window, put an image inside the window, and show and hide it at appropriate times. No such thing as 'Splash Screen' exists it .NET.

Making a Wizard in Silverlight + Xaml

I have a Silverlight application and I am trying to make each step of a wizard in XAML files, instead of hard-coded C#.
The problem is that I don't understand how I am going to switch between them after click on next button of each screen.
What is the best way to do this? I saw some tutorials on the internet about XAML dynamically loaded but none of them seem to work with me :/
Use a ChildWindow as your parent window. Then create multiple UserControls which will be framed in the content of the parent window. In the code-behind of the parent window, load the user controls into a list and set the visibility to 'Collapsed' for all of them but the first. When the user presses the Next/Prev buttons, pull the appropriate UserControl from the list (keep track of the current index) and make it 'Visible' while making the current control 'Collapsed'.
All of your navigation code will be in the parent window, but the parent window won't be concerned about the content of the wizard steps itself.
Each UserControl can be coded in XAML as a separate control so you still maintain a separation of the control from your wizards navigation logic.
You can then create a class type that will hold all of the options for the various wizard controls. Pass a reference to an object instance to each of the controls for them to update. When you get to the end of the wizard, your option object should maintain the state of all the wizard steps and the parent window can return that to the application.
I would suggest looking into the Silverlight Navigation Framework. It allows you to use "urls" to navigate between "pages" (which are your XAML user controls). It also also users to use the back and forth buttons in the browser, which may or may not be something you want to allow.
There is a VS 2010 template when you choose New Project, Silverlight, "Silverlight Navigation Application" that will help get you started.

How to make a wpf user control containing several user controls

I have created a WPF User control library. It has by default 1 user control in it. I added two more user controls on it. Added next back button to everycontrol. Now I am stuck here. What should I do to navigate from one user control to another? Can I do that in MVVM pattern? if yes then how?
Try downloading Telerik trial pack, they have a demo app (with source) that allows to browse their control. An once you have that demo app you can switch the user control dll in background when an update occurs.

WinForms UserControl image resource

I am developing a user control and want to save an image as a part of that control. I added the image to the control resource, but I can not access the image using code (like Properties.Resources.etc) Any tips?
Found it.
In the Resource Editor one needs to select in the Access Modifiers drop-down list something other than No Code Generation.

Resources