Silverlight 4/5 OOB Window Menu - silverlight

I was looking at Silverlight for building a "cross platform" desktop application (Windows and Mac anyway), but there is one show stopper that I cannot find a workaround for. On the Mac OS, in Adobe AIR, the AIR apps have a way to modify the main window's menu on the Mac OS's menu bar (File, Edit, View, Help, etc). I cannot find a way to do this from a Silverlight OOB.
For Windows obviously I could just make my own menu right in XAML and use that. However, this does not fit in at all with the Mac OS and it will look very funky to Mac users. This may not be a show stopper for many people, but for me it is. What can I possibly do to get around this short of waiting for Microsoft to implement it? (Which I doubt they ever will.)
The only thing I can think of is to build my own OS X app with a single window that has a WebView in it and then navigate that to my silverlight app. However, I lose full trust elevation at that point which really sucks.

Create the menu bar in XAML, but only show it if you're running on Windows.
See https://stackoverflow.com/a/1429517/270348 for code about how to tell whether or not you're running on Mac.

Related

GUI elements are only shown when mouse is moved over them

in my company we developed a C#/WPF application and everything works fine. By request of our customer we are limited to the .NET 3.5 framework. In the application there is a settings dialog which is displayed correctly on our companies windows 7 systems. Now our customer has sent us a screenshot that shows the dialog (a window) which is totaly blank. He also wrote that the ui controls only appear if he moves the mouse over them.
We are not able to reproduce this. It looks like a missing repaint of the window or something like this. It is working perfectly on several of our systems. Does anyone know what could cause this effect? We do not have any informations about the computer systems that are used, except that they use windows 7.
Thanks in advance
This can be a hardware render bug.
Try a software render mode(this needs a change in your source code):
Software rendering mode - WPF
Or just ask client to enable software mode on his machine:
https://msdn.microsoft.com/en-us/library/aa970912(v=vs.90).aspx

Winform desktop app and touch

I`ve a legacy winform desktop app that works perfectly with mouse and keyboard. It has some selfmade controls that involve the creation of threads and so on, for example the longer a button is pushed the faster a number is incremented.
The application also uses a win32 dll. Now, the client wants that application to be touch enabled and run it in a tablet, which also means resizing and rotation capabilities.
My question is, which is the better way to get that application touch enabled and responsive design?
I can try to modify the existing winform, but I think it will be lot of work with poor results. I can also migrate to WPF and reuse the c# code, but I might have trouble with the keyboard, as I have not found a good way to show the keyboard and maintain the whole app on the screen. Or I can migrate to windows store app, but with the problem of that win32 dll, that I`m not sure it could be migrated.
The winform application is multilingual so creating a keyboard is not a valid option.
If the target is touch screen, then for sure the best option would be a Windows Store App, although there are several limitations.
If you are not going to publish this application in Windows Store, then you should be able to use all WinAPI functions. (I'm not sure what is win32.dll - if it's your own dll then it can be a problem).

Possible to have Silverlight OOB App "Listen" for Keyboard Shortcut?

I'm building a Silverlight Out Of Browswer Application with Elevated Permissions and need the ability to basically have the application listen for a keyboard shortcut such as doing something like Ctrl + F10 will cause a window to take focus of the screen... Personally I am against stealing focus but feel that this is alright seeing as the user invokes it themselves.
So more background... if any of you are familiar with applications like XFire or Steam.. I'd like to the ability to do a keyboard shortcut and have a window open above all the other applications like Steam can with the in-game windows.
If Silverlight can't do this can someone point me towards a better language where I can create this sort of application?
If Silverlight can do this can someone point me in the direction of how to accomplish this?
Silverlight 4 can't do this and Silverlight is not a "Language". Any application developement platform (JAVA, Delphi, VB6, .NET) that has full access to the windows API could do it.
Silverlight 5 includes support for PInvoke so if your willing to wait for the RC to go to RTM then you may be able to hook the system level WinAPIs needed to watch for a hotkey.

Touchscreen Windows 7 WPF

I have an app which I need to make accessible for Windows Touch. It is not a multi-touch application. I've looked at Microsoft's guidelines for touch applications which is interesting. There is one thing I am not clear on though, that is text input.
I would like a keyboard to appear when I click in a TextBox field. Is there a way to use the built-in on screen keyboard for this?
The first monitor I tested with was a Wacom. It is an older unit that uses a pen. It had some software that pulled up an on screen keyboard whenever I clicked in any text field (in any application). It was very handy. I thought this feature was using built-in Windows Tablet software because it didn't look like it came from a third party. A newer monitor I just purchased (Elo) does not have this feature though.
Answering my own question so it won't show up as unanswered any longer... From my comment above:
Looks like I've found the problem. The general purpose driver for the monitor wasn't installing it as a Tablet PC monitor. The Windows 7 only driver will provide a Tablet PC control panel settings. Now a keyboard shows up whenever I click in a TextBox field. The Windows XP compatible driver must have been using a legacy sub-system...

Track "commands" send to WPF window by touchpad (Bamboo)

I just bought a touchpad wich allows drawing and using multitouch. The api is not supported fully by windows 7, so I have to rely on the build in config dialog.
The basic features are working, so if I draw something in my WPF tool, and use both fingers to do a right click, I can e.g. change the color. What I want to do now is assign other functions to special features in WPF.
Does anybody know how to find out in what way the pad communicates with the app? It works e.g. in Firefox to scroll, like it should (shown on this photo). But I do not know how to hookup the scroll event, I tried a Scrollviewer (which ignores my scroll attempts) and I also hooked up an event with the keypressed, but it does not fire (I assume the pad does not "press a key" but somehow sends the "scroll" command direclty. How can I catch that command in WPF?
Thanks a lot,
Chris
[EDIT] I got the scroll to work, but only up and down, not left and right. It was just a stupid "listbox in scrollviewer" mistake. But still not sure about commands like ZOOM in (which is working even in paint).. Which API contains such things?
[EDIT2] Funny, the zoom works in Firefox, the horizontal scrolling does not. But, in paint, the horizontal scrolling works...
[EDIT 3] Just asked in the wacom forum, lets see about vendor support reaction time...
http://forum.wacom.eu/viewtopic.php?f=4&t=1939
Here is a picture of the config surface to get the idea what I am talking about: (Bamboo settings, I try to catch these commands in WPF)
alt text http://img340.imageshack.us/img340/3751/20091008210914.jpg
Have you had a look at this yet.
WPF 3.5 does not natively support multi-touch (it is coming in WPF 4.0) however the samples in that kit should get you started using the Windows7 Integration Library which access the native Win32 APIs to provide the required support (Don't worry its not real ugly:).

Resources