C# - Winforms - Animated Slideshow - c#

Well i am developing an application whose interface requires an animated slide show
and by animated slide show i means UI components placed together change their positions after regular intervals in a sliding (animated) fashion. Let me illustrate my idea with the following image,
(source: deviantart.com)
in the image above there are three columns of UI components that i want to slide, what i could do is simply write a module to change x,y coordinates of the components that would give the animated slide effect but that does not work fine, because it is heave takes time in processing and all plus the coding will be complex and layer adjustment and all.
is there any slide show component on which instead of image i can place UI components
What are the other options i have or what is the right way to do it. Please need help.

Sounds like are looking for a carousel feature for you component. Winforms were not intended to be animated. Fortunately some companies have worked on products that support animaiton in this area but most are moving to the Silverlight and WPF platforms for those updated features. As a reader of MSDN Magazine I often come accross some interesting advertisements of Winform components that are quite interesting. Please take a look at this link. The cost of the product is quite high.
Telerik Sample Applications using Carousel feature in Win Forms

Also check out the following link to MSDN. It explains how you can reference the silverlight component as a COM object.
Using Silverlight in a Windows based application using COM

In this scenerio it could also be possible to embed a flash player with a flash animation, using one of the many (commercial and free) xml-based slideshows avaible for flash. This one for example http://www.flshow.net/.

Related

Is there a modern version of "Deep Zoom Composer" for Silverlight that allows for stitching together panoramic images?

Silverlight used to offer "deep zoom", a technology that respected bandwidth as the user zoomed in and out.
Finally, after many years I found a use for it; using images from a hot air ballon for students to see the effects of climate change on a micro, and macro level.
Q
How can I make panoramic photos "zoomable", similar to Deep Zoom in Silverlight?
http://openseadragon.github.io/ is the JavaScript cousin of Deep Zoom (both came from the same team within Microsoft, though OpenSeadragon is independent now). It does the client side viewing, and uses the same DZI format that Deep Zoom used.
For the DZI creation, you can continue using whatever tool you're already using and just view it with OpenSeadragon. Here's a list of additional conversion tools:
http://openseadragon.github.io/examples/creating-zooming-images/

WPF Slide Transition when Image change source (Is this even possible?)

In iOS7 Music app, when the track changes, the album cover will change with a slide transition
in WPF, I'm using iTunes COM and I replace the image source in the onplayerplayevent, is it possible to add a slide transition when the image change source?
if possible, can i add two transitions? slide left when i press the previous button and slide right when the song finishes and when i press the next button.
Thanks anyway. Just tell me if this is possible.
Developing view transitions from scratch is no easy feat, but luckily enough, there are pre-written libraries that can do this for us. I found a really useful library that you can use for this purpose. It features many different transitions (not just sliding transitions), just like PowerPoint and is really easy to use. It is called Transitionals and you can download it from the CodePlex website:
Transitionals
This Transitionals library is now on version 1.2, but you can download the help file for version 1.0 by clicking on the 'TransitionalsHelp_1_0.zip' link on this page on CodePlex.

Program architecture for Windows 8 C# & XAML app featuring graphics

If I'm looking to create a game that doesn't necessarily run full screen, but simply needs to feature 2D/3D graphics somewhere in a portion of the screen, what's my best approach?
Some specific questions could be:
What component would the rendered area use?
Are there any game libraries I could leverage for the rendered area?
What would be the most "pure" or "canonical" stack according to Microsoft to use here?
Omega --
Visual Studio 2010 and 2012 are Both WPF apps. WinRT is for Tablets / Mobile. WPF is certainly NOT outdated.
If I were you I wouldn't render everything out the way canvas forces you to, it might be a better approach to have the center item be a UI element named Frame, which is the base element for all UI related content in WPF.
In this way you would be able to leverage all of the possible types of controls in the Frame whether you decided that An ImageSourceType or Canvas is more applicable to a particular features of the game.
Depending on how you want to draw graphics, you could use (but are by no means limited to):
Canvas - which would be totally appropriate for slow moving games. This way you get the benefit of the various WPF layout routines and can define objects inside the scene in XAML/vectors as well.
WPF supports 3D graphics (using Direct3D on the backend) so you could probably set up an orthogonal projection matrix and treat it like a Direct3D context (with the WPF API). I don't have enough experience to know how slow this is compared to D3D, but it's certainly easier (built-in "scene graph" like support from the XAML architecture, for instance).
If you want to go whole-hog with Direct3D you could use SlimDX, which has a WPF shim that I've used in the past, as well as another third party control. There may be other libraries available as well.
Direct blitting to/from a Bitmap using WriteableBitmap (see WriteableBitmapEx for a third-party version with a much friendlier API) or similar.
There are probably a lot of other options too. My preference would be for using Canvas initially if it's a slow-paced game that doesn't need super-fast frame rates (the layout work does incur a fairly substantial overhead, but it's less work and may be easier to get looking exactly the way you want).
If you want absolute control and speed, use D3D through SlimDX, but this is a pretty hefty learning curve if you're new to it.

Is it practical to port code from Flash to C#?

My goal is to gain a better understanding of the characteristics of C#, and become more comfortable creating simple apps. I am fairly competent with Flash (Actionscript 3), and found an old Tic-Tac-Toe game I'd written. I started wondering about porting this code into a C# application. Not knowing much about C#, I'm wondering how difficult the migration would be.
On the one hand, the underlying game logic is syntactically similar, and therefore would be easy to port.
However, as far as the graphics are concerned, I don't even know where to begin. So far, I've only exposed myself to Windows Forms and Console apps in C#.
I'm wondering if these Flash concepts have similar analogs in C#, or if the procedures and syntax are radically different:
Placing graphic elements on a stage
Rendering lines from start/end coordinates
Event listeners on movie clips
Swapping the image inside a graphic element (or, in my Flash version, nextFrame() in a movie clip)
You may want to try developping your little game using Silverlight. Silverlight applications, coded using C# and Xaml, are pretty similar in form with flash applications, and you should find everything you need without trouble.
So I suggest you download the Silverlight SDK (free) and give it a try.
Firstly, Flash is to WPF (close enough) as ActionScript is to C#.
The WPF/Silverlight model is much more similar to Flex that it is to Flash. Everything is added to the UI tree as a object, even lines.
Likewise, adding event handlers to controls (like a button click) can be done in the "code behind" (the code that lives with the view), but the recommendation is to use the MVVM pattern. If you are new to the concepts of separation of concerns and unit testing, feel free to start with the simpler "code behind" method.
While WPF and Silverlight are very similar, I'd recommend starting with Silverlight as the SDK and available samples are richer. You can easily move onto WPF later on (though porting an application from Silverlight to WPF is not automatic).
Swapping images, as you mentioned, would be done via "Visual States" in Silverlight (or possibly changing the image reference, which is more "hacky").
Have a look at the following links to get started:
Learn # Silverlight.net
Silverlight on MSDN
Shapes and Drawing (Silverlight)
If you're looking specifically to do games and the like, you may wish to look into the free XNA framework. However, there will be differences as Flash gives you far more ability to "set up" things beforehand and modify them.
Placing graphic elements on a stage
If you go the XNA route, you will be drawing sprites using the spritebatch, you tell them where and how to draw and that's where they will go
Rendering lines from start/end coordinates
In windows forms you can do this via a simple System.Drawing call, however if you wish to do this in XNA, you will either have to make a 1 pixel square and stretch/rotate it to what you want, or use 3d primitives (Though this will limit you to a 1 pixel line)
Event listeners on movie clips
Look into delegates, but there isn't really an equivalent for movie clips to my knowledge
Swapping the image inside a graphic element (or, in my Flash version, nextFrame() in a movie clip)
This is fairly simple, depending on what you mean. If you want to, say, animate a sprite. You can do this by moving the source rectangle or changing the texture of the spritesheet. If you mean the screen as a whole, this is mostly handled for you provided you use the spritebatch. In windows forms you'll have to do more of it yourself, but the base concepts are the same.
Overall it's not that bad, but if that doesn't sound appealing check out Silverlight. It's basically C# styled flash so you may find the transition easier.
Good luck and hope this helps.

Custom WPF control for showing a Graph and highlighting Points of Interest

Question for you all, I've been charged with developing an application to view data about a testing cycle we do for environmental screening, products are placed in an environmental control, freezing and heating the product while a variety of self-tests are run. My manager would like to see a graph of temperature over time as an x/y graph, but he'd also like to have an indicator for where the test is currently at that has a small box, giving additional info, (test status, current test, running time etc.)
So what I'm thinking is I need to make a custom control that is capable of displaying this scatter graph and can also contain another content control for my additional info box, what base control should I use as a foundation, what should I look at for drawing my graph, and how can I do my layout for this? I'm assuming the use of a canvas control is my best bet for layout, and DrawingGroups with PathFigures for the graph... anyone capable of giving me more guidance?
VisiFire maybe it's your choice.
maybe you should check out Sacha Barber's WPF Graph Control. This may be a good starting point

Categories