How to create structure for Apps to later added for a HMI WPF software - wpf

I'm currently creating a HMI software using WPF to control some hardware system. One of the key goals is to create apps for this HMI software that can be installed at a later time. The idea comes is Similar to that of the iOS apps or android apps where by the apps installed can be chosen by the user.
Is there any structure that can be used in WPF to realise this.
I believe a manifest file need to be created for the main HMI software to access these newly installed apps.But what type of file system can be accessed by the main hmi software to display the newly installed apps.

I don't think there is an out-of-the box way to do that using WPF.
I have seen an example on codeproject that showcases how a WPF application loads an executable inside a container (notepad to be exact).
What you could do us create your hmi app store with WPF and have several EXE file (your apps) that can either be added or removed to your display. It might get tricky if you need to implement a communication channel between the container and the running apps, that depends a bit on what you want to achieve exactly.
I hope this can get you started!

Related

Take a photo in WPF using the default camera app in Windows 8

I was asked to develop a software in vb.net and one of it's features should be the possibility to take photos on a tablet PC. I already played around with the MediaCapture API which returns me a photo, but as it seems that it's not possible to show a preview or anything else outside of ModernUI apps. It's just pure photo capturing.
I thought for a little while how this problem could be solved. I got some inspiration from my Android phone then. My idea was to call some sort of API to open up the regular Windows 8 camera app in ModernUI mode, let the user take the photo and then receiving that through a "return value", just like you usually do it in Android apps.
Now my question is, if there is a way to start up the Windows 8 default camera app, let it take a photo and receive that back into my WPF desktop application.
I could develop my software as ModernUI app as well, but I never did that and it also seems like you must publish it over the web store then, but I only want to use that inside my company.
My other (simple stupid) idea would be to ask the user to open the camera app by himself, take some photos and come back to my software later. I could then receive the images from the folder they were stored in. I guess that would work as well, but I don't really like that idea because it's not very intuitive and seems just stupid.
If you have an idea (or an alternative), I would be really happy if you could share it with me.
Thanks in advance!
Unfortunately, there are no .NET classes that allow you to access a webcam or integrated camera on your computer. This means that you have to take a look at the native Windows API and call it from your application. I cannot point you to the right methods that you have to use, as I just have used Microsoft Media Foundation to capture a continuous stream of images from a webcam and encode it to a video file.
There are some sites that encapsulate this native functionality in .NET classes, but I don't know if they are good or not:
http://dotnet.dzone.com/articles/using-webcam-wpf-application
http://www.yiigo.com/guides/vbnet/how-to-process-image.shtml
(just google for more if you'd like to).
In Windows Store Apps, this task can be performed relatively easy with the media capture API you've mentioned. You can also side-load Windows Store Apps if you have Windows 8 Pro or Enterprise - then you do not have to publish your app in the Windows Store.
If you have any further questions, please feel free to ask.

Compile each XAML page as DLL

I understand my "this" query may sound very generic but any pointers to guide is highly appreciated.
We are building an WPF application based on MVVM design pattern (with DevXpress controls) and want to achieve the following.
There will be one .EXE file which will run the applications.
All my XAML files need to be as DLL [Why? - Reasons specified below].
Call the DLL dynamically and load with in the WPF application.
[Why?? - Reasons]
Our application is a client/server intranet application. We are planning to use ClickOnce deployment to deploy the application. In case there are any changes to the application, my though is we don't have to change the entire application and recompile it and then deploy so the client machines will be updated.
Instead we can change only those screen or XAML file which are needed and update on the server and ClickOnce will automatically handles the updates on the clients. This also, helps us in maintaining our application and less troublesome for the developers and UI designers.
I am welcome to another better approach also.

Create a .dll from a Silverlight Web Application

I programmed a Virtual Keyboard (On Screen Keyboard) as a Silverlight Web Application, now I want to use this Keyboard in an other Silverlight Application (call the Keyboard when clicking a Textbox). I thought I could create a .dll and use this in my other Application.
So is it possible to create a .dll File from a Silverlight Web Application?
Thank you for reading,
Knut Hansen
You simply need to convert it into a Silverlight Class Library. There are some things to look out for, but it isn't too hard.
It is one of the options when you create a new project in Visual Studio.
See Microsoft's documentation for more info:
http://msdn.microsoft.com/en-us/library/cc838164(v=vs.95).aspx#silverlight_class_library_project
also you can think of a web service, in this way your application can be used by anyone else, of course you can specify users of your app. I think web services are more recent and using them is more future-oriented, give it a go!

How to make an setup just like Devexpress installation (v11.1.8)?

I want to pack my file in to a single executable file "setup.exe", my application is written in c# and WPF, I know that there are a lot of applications out in the store for creating a installation pack, but the point is which one would help me to build my installation pack just like Devexpress dose ?
For an UI similar to DevExpress you will need a setup authoring tool which offers an external UI and rich graphics.
Advanced Installer and InstallShield have some great UI themes which can get you started. You can also find a list of setup tools here:
http://en.wikipedia.org/wiki/List_of_installation_software
You'll probably have to roll a custom solution for this one. I expect nothing less of the Devexpress team then creating their own installer.
If you're application is not heavily bound into the registry and all kind of windows folders it should not be that hard to create an application that extracts some files into a directory and create some great UI while copying.

Minimum requirement users must have to run a simple WPF browser application?

I am thinking of making a website using a WPF browser application, but would like to know the minimum requirement a client/internet user must have to access this website made by using WPF.
Please state even the very basic requirements, like does he need to run Windows or will even Mac and Linux do, with any browser to view the application?
Three main requirements:
User has to run the application under Windows;
The browser should be either Interned Explorer or Firefox;
The .Net Framework should be installed on user's machine.
One requirement is to have the .NET framework installed (same version as you used to build your application), so that means it will only run under Windows.
Also I think only Internet Explorer and Firefox support XBAP applications.
Also I assume that you know there is a lot of restrictions for you, the developer, on what is allowed or not compared to a full trust program. For example, the file system and registry among other things are restricted in a WPF browser application.

Resources