Cross platform multi selection - reactjs

I'm maintaining a React-based web UI which is used both in standard web page and embedded in native desktop apps, where it should look and feel like native app. Both web and native desktop apps are used in both Windows and Mac.
I'm using Fluent UI controls and trying to use standard already implemented controls, but some cases require customization, so few functionalities and controls are implemented manually. In particular, some of the controls (list, tree view, etc.) support multi-selection, which is define differently on Windows on Mac, at least on native desktop apps (for example, Control / Shift keys on Windows vs. Command / Options keys on Mac).
Is there a definition and good practice when implementing such multi-selectable controls? The only way I could find is to manually test the OS and implement the behavior differently for each OS, is there any other alternative to implement this?

Related

Do any of the Windows system applications use WPF?

Context: I am looking for examples of popular applications that use WPF for their UI.
With Windows 8 and Windows 10, certain parts of the OS got a new 'look-and-feel', for example:
The system settings dialog
The taskbar and the start menu
The calculator app
The task manager
Do those or any other Windows system applications use WPF for their UI?
This question already provides a list of existing applications that use WPF: What real world WPF applications are out there?. However, I would like to know if there are any builtin Windows system applications that use WPF.
None of those applications use WPF. Instead they use UWP, which was inspired by WPF, but is quite a different framework underneath.
There are WPF applications in many default Windows installations, though. For example, the PowerShell ISE is one.
You could try Snooping them to find out - It's not been updated for several years but I tried it on a splinter new 4.6 app I'm developing and it's detecting it and works fine. Whatever it can detect is certainly a WPF app - the inverse is not true however.
That being said it did not detect calculator or task manager for me.

Is it possible to port a windows phone 7.0 silverlight class library to windows 10 mobile

I have a windows phone class library that is built for windows phone 7.0(coded in c#). Is it possible to port the same class library to windows 10 mobile sdk?. Or, do I need to write the entire class library from scratch to support windows 10 mobile.
It is possible to port it, but not in an automated way.
UI components should be relatively easy, as long as not a lot of
third party controls such as Telerik for Windows Phone were used.
Third party libraries need to have been ported to the WinRT platform
(or UWP, as it it called now) as well, which is not always the case.
Most of the XAML can be re-used, but some namespaces, events and properties are named differently (eg: Tap becomes Tapped).
Some layouts may need to be reworked a bit due to a different approach in scaling (Silverlight scaled everything up, as it pretended a screen is always 480px wide).
HTTP calls: This is probably going to have to change a lot, depending
on how they were implemented in your WP7 library. Webclient no longer
exits in WinRT, HttpClient or creating your own HttpWebRequest is the
way to go. Since WP7 apps did not have async/await by default, I
would suggest rewriting this part.
XML parsing: This should be compatible (maybe some small syntax changes)
I/O operations: Probably massive changes. WP7 used the Isolated Storage mechanism, which has been replaced. Capturing images with the CameraCaptureTask, and basically all use of sensors will have to be rewritten.
Local Database is not longer supported. Use Sqlite if you want to use a database in your app.
The application lifecycle is also completely different in WinRT. Pages in the backstack are not cached automatically and a lot of events in a page work differently, or might not occur at the same time as they were in Silverlight applications
for more info: Move from Windows Phone Silverlight to UWP
Most of UI elements has changed from wp7.0 to Windows10. It will have to completely rewrite. The same applies to WP 7.0 API.
If you has portable library then the problems should be much less

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.

What languages have multi-platform support for app developement?

I'm going to be building an application that will be used across multiple devices including:
iOS
Android
WinRT (Windows 8 & Window 8 RT)
Windows Phone 8
I would like to develop the business logic once and use it across all devices, and then develop the UI for each individual device which in turn interfaces with the business logic. Is there a language that is natively supported across all of these platforms and if so what is it?
Note: I'm NOT Looking for a all-in-one solution for UI and business logic. I'm simply trying to develop the logic behind the app that can be re-used if possible by all platforms
Have a look at Portable Class Libraries. These are typically coded in C# and can be reused throughout all those platforms.
You will probably also need Xamarin

RAD GUI builder (preferably WYSIWYG) for developing a .Net GUI app to run on Linux

I want to build a rather complicated GUI app on the .Net framework. The app will have the following graphical capabilities:
Plotting/updating realtime data
Allow manual (using mouse) drawing/dragging/editing of lines etc on a plot
Allow selecting of graphical objects/shapes on a plot and drag/drirop to a new location on the plot
Ideally, I would like to use VS to do my initial development, because the VSIDE is (understandably) much more sophisticated than the monodevelop tools. However, I will be running the application and maintaining the codebase (once the development phase is completed), on Linux, using monodevelop.
It is important for this reason, that I make sure that I do not use any .Net components that have not yet been ported over to mono.
Given the graphical functional requirements above, I would like to know if I can expect to be able to develop such an app on Windows and then port to monodevelop?.
I am aware that components like WPF have not been ported to mono, so are there any other .Net GUI components (available on mono) that I can use in my application (to make the port possible)?
From a past experience start with a Windows Forms plain app. If you want the port to be as clean as possible forget about complex UI components, you can always use your custom controls but check third-party ones you use don't call Win32 API directly. That you can do it within Visual Studio (check this plugin for more productivity) but I want to warn you about two things:
Interfaces built with Visual Studio (WinForms) when running on Linux look awful.
If you want a clean UI take a look at Gtk#

Resources