WPf Loading screen - wpf

I have window with loading icon.
In application I do like this
// create loading window
loadingWindow.Show();
//do some operations
loadingWindow.Visibility = Visibility.Hide;
loading window is not showing.
Can you tell me guys what I do wrong?

Maybe this will give you some help in the right direction. I believe you have to use threads to get the loading effect.
Edit: You show the loadingWindow, then you do operations and then you hide the loadingWindow. Since there is nowhere stated that the app should wait with making the loadingWindow hidden till the operations are done it won't show up. If you look at the link I posted you should get a general idea of how to make a loadingscreen. If it so happens to be you do need help with it, just say so in a comment.
Hope it helps.

If you want a splash screen, use the SplashScreen class.
Note that it can only display an image, so it's not suitable if you need something more complex (e.g. animations or interactivity)

Related

Is it possible to maximize a SDL window?

I would like to make my program to maximize using the maximizing button left to the cross in my C program but I can't find how to do so. I found that the ShowWindow Function could be of some help but I don't understand it.
If someone could explain it if this is the solution or tell if there is something else or nothing at all, it'd be very nice.
By the way, I'm using SDL if that help.
PS: the maximize button is indeed grayed out.
The 'maximize' button is disabled if your window is not resizable.
Pass SDL_WINDOW_RESIZABLE flag to SDL_CreateWindow, and make sure your code can handle window size changing.
I may be wrong but it seems that the best way to maximise a window is to use the SDL2 because the SDL doesn't seem to allow maximisation, just resizing.

winforms messagebox background colour

I am new to winforms and I want to keep things simple
When I create a message box: I notice the top half is white background while the lower half is grey (!!!)
(what I really want is all background white).
But even the VisualStudio dialog doesn't behave this way
Can someone please help me?
Do I need to write some custom code ?
I would post the image but not allowed;(
Thanks
MessageBoxes are displayed by the operating system. If the options that are available aren't good enough, then you have to make your own form.

Why is my WPF Frame not rendering anything? Known bug?

I have a WPF Frame with a web-based HTML source and though the contents are there, they aren't showing up. I know that the content is there because if I right click in just the right spot I can save images. Also, if I do print preview it shows just fine. The stuff is there, but it isn't showing up. Is there a known bug?
I used code from here to create a placeholder control with a window that floats right above it, so I could put the frame in the window. Its a hack but it works... sigh.

Image sliding control using wpf

I want to create a slider with images like a control in the bottom of the youtube(floating images with left and right navigation button). How i have to start. i am new to wpf.
for example: http://blog.wpfwonderland.com/page/4/
Geetha.
I think the best way to start anything is just to start right away. Even if you don't know how to start... Just write the first line of code. Let it be awful. Hardcode images. Use dirty tricks. Then throw it away and rewrite.
Along with writing the code read a lot. There are dozens of books on WPF out there. MSDN sections are awesome.
Don't forget to read the code too. This technique is extremely helpful. You can find good examples of carousel implementation.
Hope this helps.

Display percentage on piechart in WPF

Hii
Can anyone tell me how can I show percentage on the piechart....
The percentage is seen on mouseover event but I dont know how to show
the percentage on the piechart's slices....
If you are looking to put labels on the chart itself (instead of tooltip), take a look at this great blog post by WPF guru Bea Stollnitz.
It shows how to do this, in many different modes, and explains not only how, but why.
Take a look at amCharts Bundle for WPF. Pie chart supports labels on the slices, outside connected labels and includes an algorithm to prevent label overlapping.
I've just followed this tutorial (just to make sure) and I get the percentages of each slice as tooltip on mouse over by default.
If you post your code we might be able to spot if there's a problem with it.
You can use labelFunction in mx:PieSeries, and lableFunction look like that
private function pieSeries_labelFunc(item:Object, field:String, index:Number, percentValue:Number):String
{
return StringUtil.substitute("{0} ({1}%)",item.description,percentValue.toFixed(1));
}
Where description is the label that you want to see.
feel free to ask any question.

Resources