Is there any kind of animation available for WPF app like expression animation in UWP?
Suppose I want to move a rectangle vertically with my mouse and another rectangle should move horizontally accordingly to the first one.
You can try with WindowsXAMLHost: it's a new feature, still in development, incorporated in the Windows Community Toolkit.
By using the WindowsXamlHost control, you can add built-in or custom UWP controls to the User Interface (UI) of your WPF or Windows Forms desktop application, even with custom functionalities.
Check the related MSFT Docs here: UWP controls in Desktop applications
Then get the companion app from the Win Store: Windows Community Toolkit Sample app
It will be a little bit tricky... but I'm sure that it is possible to do what you requested.
Best regards
Related
Can both WPF and Windows forms controls be used within one application? How difficult or practical an idea is this?
It is fairly straightforward to host WPF controls in a WinForms app with an ElementHost adapter or WinForms controls in a WPF app with a WindowsFormsHost adapter. There are not too many resources on the web showing how to do either of these, however. In the process of learning how to do this for myself I quickly discovered the inherent symmetries between the two pathways. I distilled all my notes into an article comparing and contrasting these symmetries using a unique approach: the article is really two side-by-side articles, comparing every step in detail, starting from creating a user control in one technology to hosting it in an application in the "opposite" technology. My article, published on SimpleTalk.com in August 2010 is available here: Mixing WPF and WinForms.
For completeness, here are a couple good MSDN references, one for each pathway. In fact, the demo solution accompanying my article started from both of these:
Hosting a Windows Forms Composite Control in WPF
Hosting a WPF Control in Windows Forms
I believe there is a WindowsFormsHost control you can put in your WPF apps which will do interop back to WinForms code:
http://blogs.msdn.com/ivo_manolov/archive/2007/07/26/wpf-win32-interop-part-1-hosting-winforms-controls-in-wpf-windows.aspx
We hosted significantly complex WPF controls in an existing LOB WinForms app. It can be done, but we did have issues (some no doubt caused by the steep learning curve). These primarily had to do with loss-of-focus events not being fired when expected, and also keyboard navigation issues.
You can also use an HWNDSource and HWNDHost controls to embed WPF controls in a WinForms (or any Win32, really) app.
When hosting non-WPF content (Be it HTML, WinForms, or Win32 content), you will haveAirspace issues. This means you can't completely compost the WPF content with the hosted content. You also can't animate it etc. There are some interesting issues with respect to scrollviewers see here for more details and a fix also.
Yes you can, both Windows Forms within a WPF application, and WPF controls within Windows Forms. www.novamind.com's mind-mapping application is a successful mix of the two technologies.
Me and a friend are working on a relatively big project, which is basically a darts scoreboard and tournament scheme software with stats tracking etc. The problem is that the tournament scheme part has been done in Windows forms, and that is a very massive part of the project, but the scoreboard part has to be done in WPF because that UI needs a little style tweaking. The thing is how do I go about getting these 2 working in conjunction, starting the whole thing from... well the WinForms end, and it exchanging data with the Scoreboard(WPF app) I need very basic things, like passing a string from a label in the form to somewhere in the WPF window. I would move the tournaments scheme to WPF, but we just don't have enough time at this point.
You can use controls created in WPF application in your Windows Forms application, for an example see Walkthrough: Hosting a WPF Composite Control in Windows Forms.
Or you can use control created in Windows Forms application in your WPF application, example:
<WindowsFormsHost>
<wf:MaskedTextBox x:Name="mtbDate" Mask="00/00/0000"/>
</WindowsFormsHost>
I'm trying to program a security System using a Raspberry Pi and new Windows Universal App Platform (so I'm using Windows IoT).
This security System should look like the LCARS OS, used in the "younger" Star Trek Spaceships. I had no Problem designing the Buttons etc. but if you know LCARS, you know that there are theese so called "elbows". I thought it would be a good idea to use a canvas for that.
I tried to give the canvas a border that is drawn with a beziercurve but that did not work.
Actually I have no idea how I could resolve the problem. Is there anybody who may help (or has a complete different /better idea)?
I'm using C# with XAML for developing (Blank Windows Universal App Template).
I am developing WP 10 application which includes playing videos in full screen mode. When I switch to full screen mode I want to have control buttons (play, stop...) visible on touch (at the moment they are hidden behind the full screen video). I'd appreciate if someone could give me some directions how to do it.
Here is an example of WP 10 official video application control bar. It appears if you tap screen and disappears after a second or two.
[WP10 official video app image][1]
EDIT:
Seems like new SDK has built in control bar and it's really simple to use.
Just add Media element attribute
AreTransportControlsEnabled="True"
Seems like new SDK has built in control bar and it's really simple to use. Just add Media element attribute
AreTransportControlsEnabled="True"
I would like to write an application where you can use your hand instead of mouse. I wrote some WPF and use a hand style and it work good.
But I want to use this control outside and WPF window, just like normal mouse coursor. Is it possible to write it with Kinect For Windows V2 ?
What you need is a service, but not WPF app. So that it still can process input from Kinect in background, not only when your app is active and foreground.
You need to emit mouse move/click events in order to use it globally in the whole Windows OS. Here is one of examples on MSDN: https://social.msdn.microsoft.com/Forums/vstudio/en-US/1ea09f18-94f6-4f4f-bcba-d02da27beaa4/control-mouse-position-and-generate-click-from-program-c-winforms-aim-control-pc-from-serial?forum=csharpgeneral