How to make page flip effect in WPF? - c#

All the info i found about page fliping is just source code that i'm having trouble implementing to my code.
this tutorial
kinda explains the logic behind page fliping but the code is for windows form and not WPF.
i dunno how to approach it because as i understood bitmaps are not used the same in WPF.
anyone has a good tutorial or could give me some pointers?
What im trying to do is i have an image that fills entire screen and i want to flip it to to next image ( like a book) that will also take the entire screen.
(Not 2 images on a screen)
Help?
To anybody that suggests using C++ or DirectX, I'm not interesting in learning those skills. Only C# code please.

The WPF bag o'tricks has a page flip sample with code.
The github source
https://github.com/thinkpixellab/bot
Specifically, look at the TransitionPresenter sample in the demo project where there are multiple transitions defined, one being page flipping.

Related

Accessing Update(GameTime) when implementing Monogame in Winforms

So I've been following this tutorial https://www.youtube.com/watch?v=g-JupOxwB-k on how to implement monogame within winforms. I've been successful by following the tutorial from scratch to finish. Sadly there is only one video in the tutorial series.
I've created a class that inherits from GraphicsDeviceControl in order to draw it on a windows form. Now, this works in the sense that I have implemented the control onto the form. But it only draws the thing once. I need to implement the GameTime in an Update(GameTime) somehow but I have no idea how as this entire crossover between winforms and monogame is difficult enough.
So many tutorials or posts have outdated links or are outdated and no longer applicable. I tried following this guide: https://blogs.msdn.microsoft.com/shawnhar/2010/12/06/when-winforms-met-game-loop/
But I just feel so stupid I can't get it to work. What is Tick? What is TargetElapsedTime.TotalMilliseconds? No code snippet on that page helps me.
TL;DR:
I want an Update(GameTime) and my Draw() to happen once per frame inside the xna control that I've added to the winform. How do I implement this behavior?

Drawing canvas in ASP.Net

I am trying to create a simple field on my .aspx form where one can draw, this could include a signature or a name. After which i should be saved as an image (.jpg). I don't know how I am going to program this, any suggestions on how i should take this problem.
I have not done a lot of programming on this subject. I am simply looking for ways on doing this and haven't found a lot of useful information after a quick search.
(P.S. I don't have any experience with using canvasses and such)
Thnx for the suggestions!
Check this page,
you will find tutorial with some jquery plugins to draw canvas in HTML page.

ASP.NET MVC drag and drop designer example?

I'm looking for an example implementation of a ASP.NET MVC-based, drag&drop designer surface. My googling skills are failing me, so I thought maybe someone has knowledge on an example implementation.
I'm not looking for a paint on canvas functionality - I'd rather have dragable and dropable shapes/images.
Ideas anyone?
William Malone has a awesome tutorial about that, int tutorial he developed many functionalities and all very much explained.
Check it out:
Create a Drawing App with HTML5 Canvas and JavaScript

Image gallery swipe UI in MonoTouch

I am looking to create a UI experience almost identical to swiping through images in the Camera Roll on the iPhone. I have 5 images that I simply want to be able to swipe through. This view will be the first view of a Tab Bar Controller that I have in place. This is my first iPhone (iOS) app attempt so if anyone feels this question needs to be broken down into smaller chunks, please let me know.
Here's an example of the paging control for MonoTouch I developed some time ago: https://github.com/escoz/monotouch-controls
Take a look at the PagedViewController. That code is actually used in my app, Quicklytics.
Use Pagecontroller.
In this example they have add label, instead of that you add your imageView.
EDIT:
For Monotouch.
The Photos module of Nimbus is exactly what you are looking for.
http://docs.nimbuskit.info/NimbusPhotos.html
The MonoTouch bindings can be found here.
https://github.com/theonlylawislove/MonoTouch.Nimbus

SlimDX viewports in WPF controls

I am transitioning from WinForms/XNA to WPF/SlimDX because:
a) all of the benefits of WPF over
WinForms (but learning curve = ouch!)
b) I would like to have multiple
SlimDX viewports attached to Panels.
XNA has 1 "game" screen.
c, last and least) DirectX 10 support
All of my previous XNA code is in C#. I am having trouble figuring out how to port this over to SlimDX and WPF on a high level. I have searched like crazy. The closest I have found are:
1) http://www.gamedev.net/community/forums/topic.asp?topic_id=507941
Many articles point to this discussion, however it is incomplete and I can't figure out the XAML, and I get device errors after attaching all of the _slimDXDevice and Window1 events that were left out.
2) http://www.codeproject.com/KB/WPF/D3DImage.aspx
This article assumes the user is porting C++. I am porting XNA code which is very close to MDX code.
If I could get to the point where I have a WPF form with a custom SlimDX driven viewport that was just a blue box, I could go from there. In XNA I rendered many separate RenderTargets and placed them all over the screen, now I want to attach them to controls. But first, just 1 blue box! :D
Any ideas? I feel that this is either simple or that there's some "cookie cutter" code that I'm missing. Greatly appreciated!
You can look at the sample now. It's just been checked in to our repository, so you'll need to use SVN to get it (or wait until we ship the Feb 2010 release):
http://code.google.com/p/slimdx/source/detail?r=1356
D3DImage is the class you want to use. Even though the codeproject tutorial is C++, it is very applicable to SlimDX and WPF.
All you have to do with your SlimDX, is run your code normally, but DO NOT run a Present(...) on your device or swap chain. At the point where you would put a Present(...), do a D3DImage.SetBackBuffer(...) and send your SlimDX surface's ComPointer property to it. Then do D3DImage.AddDirect(...) and you now have D3D composited in WPF.
Also, make sure you create a IDirect3DDevice9Ex or else your performance will be terrible in anything but XP!
I recently was messing around with D3DImage and SlimDX and didn't find it too difficult to get it working (with DirextX9). I have some code at my home pc that I'll post later, but it's pretty similar to the code in the links provided.
I was never able to get it working with a higher version of directx though. Jeremiah has a nice blog post about using a directx9 device as a link between directx 10/11/d2d and the D3DImage, but I couldn't get it working with Slimdx. I didn't put a whole lot of effort into though as directx9 did what I needed it to do and I kind of wanted it to work on XP.

Categories