CPython WPF interop - wpf

Is this possible?
Is there any thinkable way to have interop between a CPython scripting app (3rd party) and a WPF UI app?

There are plenty of ways. Both CPython and .NET support quite a few forms of IPC, which could easily be used to allow them to communicate.

Related

How to port C# applications from windows for linux?

Windows.Forms library contain many bugs which effectively prevent applications from working. WinForms Designer is unable to put WebBrowser control on form. NotifyIcon class doesn't work under LXDE (see the bugtracker of KeePass). Clipboard class is incompatible with default manager of Calculate Linux. Drag and Drop have problems in DockPanelSuite. WinForms Designer is not finished because of opacity problems. WPF was never implemented and no plans to do it.
And mono team says "we don't want to develop WinForms, because this is old technology."
How should one port desktop C# application from Windows to Linux? Rewriting it with Gtk# seems to be too hard...
What is easier - to fix mono WinForms, to implement WPF, or to rewrite all applications in the world to Gtk# ?
As you have already found out Mono WinForms implementation is suitable only for very simple applications. Take a look at "Cross-Platform Desktop UIs" blog post from Xamarin employee Mike James who summarizes available solutions:
Traditional approach
WPF or WinForms frontend on Windows, GTK# frontend on Linux and Xamarin.Mac on Mac OS X. IMO this is the best way to go and it may be easier than it looks if you have correctly separated business and presentation layers in your app.
XWT
XWT toolkit uses the same API and provides native look on all platforms but only a limited subset of components is implemented. Its usability for your projects depends on what components you really need.
HTML frontend
Create HTML frontend using simple WebView component or Awesomium HTML UI Engine. This may be a viable option in some cases but I am not sure whether it is possible to implement systray icons with this approach.
QTSHARP
Open source project which aims to implement .NET bindings for multiplatform QT toolkit. I have never tried it but according to project website it seems to be in early stage and currently tested only on Windows.
BTW I am currently using WinForms for Pkcs11Admin application but I plan to use traditional approach as soon as I hit a blocker bug on any of the supported platforms.

How to using Windows store app (same as winRT/metro) library in WPF?

I want to using Windows Runtime Libary(winRT) in WPF Application. (win8.1)
my WPF application needs to WiFiDirect.
but WiFiDirect library is only in WinRT!
(namespace Windwos.Networking.Proximity)
http://msdn.microsoft.com/en-us/library/windows/desktop/windows.networking.proximity.aspx
so i hope to using winRT in wpf app.
How to using winRT library in WPF?
Seems like you are going other way.
In theory you can not use a dll created for higher version or a different framework by referencing.
Perhaps you can link them via creating a communication channel between these two.
So create an executable wrapper for your WinRT library (service) in the same framework and do connect with your WPF app by using one of them or perhaps other communication approach
so possible options but not limited to are
Messaging with MSMQ
Sockets
Interprocess Communication with Named Pipes
and perhaps more

Is there any cross-platform GUI framework that support data binding like in WPF?

Recently I'm working on a game project, and we need to develop some editors for designers to use. While other programmers are all working on Windows, I'm working on Mac OS X. I'm familiar with WPF and Windows Forms development and I'm looking for some GUI frameworks that support data bindings similar to WPF or Windows Forms development.
The GUI framework should satisfy these:
Cross platform
Support data bindings to object (like WPF or Windows Forms)
It's best that it support XML serialization because XML is our data format
By the way, I don't care about the programming language, GUI frameworks based on any programming language are all welcome.
Silverlight runs on MacOS.
It also runs out of browser so you can create an application that doesn't require the browser to be run and hence looks like a regular desktop application.
Depends on the platforms that you want to support, but you could have a look at Moonlight the mono port of silverlight. Have a look at the alternative section of this page:
http://www.mono-project.com/WPF
Knockout.js is said to be good. My colleagues prefer it over Wpf and Silverlight bindings. For instance if you have a fullname prop, which is a result of firstname and lastname, you have to hassle in Wpf with propertychanged, in Knockout.js you define it observable and the runtime makes it correctly notify its observers. It also supports validation.
Although it doesn't have data binding like WPF or Windows Forms, Real Studio does works wonderfully for creating cross-platform applications. And XML is supported, of course.
Try JavaFx, it supports binding better than Java Swing. Also styling is based on CSS instead of Microsoft proprietary style logic.
Both WPF and JavaFX will target the GPU for extra fast rendering; they are comparable and competitor technologies. But JavaFX is cross platform and less likely to be abandoned given Microsoft's track record.
http://www.oracle.com/technetwork/java/javase/overview/javafx-overview-2158620.html
Also, other answers here say Silverlight but Microsoft has abandoned this.

MVP or MVVM framework for both WPF and .NET CF 3.5 development

I am creating a draft architecture outline for a disconnected client-server platform, that involves multiple different client types. I need to support: web clients, desktop workstations and mobile devices (WM 6.x now and Android later).
I am searching for a MVP or MVVM based framework that would let me to reuse as much of the code and architecture as possible between clients, while:
using WPF for desktop development
using .NET CF 3.5 for Windows Mobile development
This framework does not obviously need to support Android, however I am considering Mono for Android to develop the Android client (for easier maintenance of the whole platform), so portability would have been an added asset.
So far I ruled out:
Prism (does not support WM based mobile devices - Windows Phone 7 only)
MVC# (does not support WPF)
I would appreciate any hints that would aid in researching the subject further.
These MVVM Frameworks work with Windows Phone 7:
Caliburn Micro
MVVM Light (it doesn't advertise it, but I've been to a demo where it was used on WP7)
ReactiveUI (Uses the Reactive Extensions for .NET)
My personal favorite is ReactiveUI, but if you've never used the Reactive Extensions it can be a brain burner at first.
As for UI Composition (you mentioned Prism), there aren't a lot of options, mostly due to reflection restrictions on the phone. I have seen an article where someone got basic MEF working on the phone and MEF is probably all most people need in this situation. You can check out that article here.
Hope this helps.
In my opinion, this would be a custom Framework with a mix of UI Processes for different client types. The business logic or entities can definitely be reused to suit the needs of the view.
I did the same research and I concluded the following (which I did not implement yet):
There aren't any open source MVVM frameworks that support .NETCF. You
can only find MVC or MVP, but not MVVM.
Suggestion: get the source code of an Open Source MVVM framework that supports the Full/Desktop .NET, and see if you can adapt it(so that it recompiles) to the .NETCF. I found the following two, which also support the other platforms that you mentioned:
MVVM FX for Windows Forms and Visual WebGUI - Home
MugenMvvmToolkit
Other than that, I don't see any other way of doing this.
HTH,
MVVM wouldn't make much sense in Windows Mobile + .NETCF since you don't have INotifyPropertyChanged and implementing Model-View-Presenter in WPF or any INotifiyPropertyChanged supported framework wouldn't be as effective as Model-View-ViewModel
You can share assets between the full and compact framework by moving most of the business logic into a seperate class library (or several) that target the .NETCF. You can reference a .NETCF library from a full framework project, but not the other way around.
Check out this very good article by Daniel Moth describing how to share assets between the compact and full framework:
http://msdn.microsoft.com/msdnmag/issues/07/07/ShareCode/default.aspx

Which to use - WPF or Silverlight?

I want to create a desktop like app, but I'm kind of confused as to which technology to use. It seems Silverlight functions like a desktop app. Which technology is better suited and has is more future proof?
WPF is the framework to go with if you are building a desktop application. Silverlight is more of a web application framework. It all depends on where and how the application is being used.
This Question compares the two.
Desktop apps should be built with WPF. Silverlight has a lot of security restrictions which doesn't make life easier.
Which technology is better suited and has is more future proof?
This depends a LOT on the purpose and goals of your desktop application.
If your application needs to interop with the system in a "non-standard" way, or provide other types of 3rd party interop, WPF will be a superior solution (at least until SL 5's P/Invoke support).
However, if your application is a LOB application, Silverlight (running OOB) has many advantages - especially if you want to take advantage of things like RIA Services (which hasn't been ported to WPF).
WPF has at its disposal the entire .NET framework while Silverlight in an attempt to be lightweight has a part of the framework (plus some really cool things). So, it really depends on the scope and deployment methods. To me it makes more sense to make a Silverlight application a desktop application than to make a WPF application deploy through the web. But again, let the scope dictate. If you're wondering which to learn, the answer is simple - either one as they are similar enough that when you're good at one you'll be okay in the other.
If you're used to WPF, you'll find that Silverlight lacks a bunch of major and minor features like data triggers, FindAncestor, synchronous WebClient requests, and so on. Probably not deal breakers but definitely annoyances.

Resources