I have a Windows Mobile 6 application, written in C# and I want to port it to Windows Phone 7.
What modifications do I have to do to the original application? Do I have to modify only the user interface or are there any other things I need to modify in the backgroung code?
You can not use native API in Windows Phone 7 applications.
You should recompile your dlls from wp7 environment.
UI should be re-written with XAML.
All interaction with network should be acync.
WebBrowser is different from WinMobile6 one.
You can not use sockets (should wait for Mango update).
It is likely you will need to make a decent number of changes. The framework changed from .NET Compact Framework 3.5 to Silverlight Phone Edition, aka almost-but-not-quite Silverlight 3. And the guidelines for submission to the app store are much stricter in terms of user experience, e.g. time taken to load the app, behavior of background processing, etc.
Related
I have to design a simple application to communication via serial ports with a machine and then record the responses in a excel file. The application needs to be able to work with window XP all the way up till windows 10. Is WPF .net 6.0 a good choice?
From what I see you will need to go back all the way to .NET Framework 4, if you really need to support XP. I have however never tested this, and you might still get it to work. If you only need Windows 7 and upwards, .NET 6 seems fine. The supported OS Versions of .NET Core can be found on GitHub. The supported Framework versions for each OS can be found in Microsofts Documentation.
Your specific needs seem to be serial port communication and excel file creation, both are compatible with .NET Framework 4.
You don't explain why you need a GUI, WPF will be a problem, but WinForms should be fine.
OP:
Will WPF .Net 6.0 Applications work on Windows 7 or Windows XP?
TL;DR: hardware-based Windows Desktop acceleration is not available on XP so there is no point trying to deploy WPF on it irrespective of what version of .NET you are trying to use
Windows XP support has ended
OP:
...needs to be able to work with window XP all the way up till...
Unless you are working for a major government body, support for Windows XP has ended, so no.
WPF requires hardware acceleration
Also, given that you are wanting to create a WPF app, a technology released late 2006, one of the biggest selling points of WPF historically was that it was one of the first MS GUI frameworks to support hardware-acceleration (apps were blitted to the screen in a single operation via DirectX) - something that didn't appear in the Windows Desktop until Windows Vista in early 2007 (remember suddenly people were buying 3D cards just to run Windows).
Unfortunately, Windows XP, an operating system released in 2001 predates hardware acceleration in the Windows Desktop, so even if you managed to deploy a WPF app on XP, it is unlikely that it will be hardware-accelerated and will run poorly.
Additionally, WPF was originally released in .NET Framework 3 and required one of Windows Vista, Windows Server 2008 R2 SP1+.
What's the minimum for WPF?
You can use WPF on Windows Vista+ with .NET Framework 3.0+ safe in the knowledge that it will benefit from hardware-acceleration.
What about the .NET 5+ road?
Given that WPF in .NET 5+ is Windows-only anyway (thus kinda defeating the mandate of cross-platform that is .NET Core/5+) and the fact that more and more Windows-specific technologies are either being dropped or not ported in the first place to .NET 5+, you really need to ask yourself:
Question
If I know my app is only for Windows and I don't care about cross-platform, should I start to use .NET 5+?
...to which the answer is a big "Be careful before signing up!".
The following technologies are not available in .NET 5+:
App Domains
CAS (including Security Transparency)
GAC
...which is a real shame since there are quite a few legacy WPF (and WinForms for that matter) Smart Client projects out there that require these technologies for bullet-proof extensivity and sandboxing of 3rd party plug-ins.
To me WPF .NET 5+ is a bit of an unknown; it is unclear if it is hardware-accelerated and even if it is, do you want to risk such support being dropped in the future (in exactly the same way AppDomain.CreateDomain was dropped in .NET 6).
My advice would be to stick with .NET Framework 3.0+ (.NET Framework 4.x+ would be better) if the intent is to create hardware-accelerated WPF apps.
I have a Windows phone 8.1 Silverlight application.
Now I need to make it run also on windows 10 phones and tablets. I checked and the app is available on windows 10 phones, even if deployed for windows 8.1 but it seems like I can't install it on windows 10 tablets.
My question is pretty simple:
Is there a "fast way" for converting the 8.1 project to UWP?
Can I deploy my app for tablets without re-writing all the code?
Thanks all
This question is oddly similar to one that I answered just yesterday. It's not really a duplicate so I will restate the answer here along with a link to the other question (1)
Unfortunately there is no easy and fully automated way to port your Silverlight app to UWP mostly because the API footprint has changed and updated between the 2 platforms. There are a lot of similarities but also a lot of breaking changes that require some manual changes.
here is Microsoft's guidance for this particular upgrade path.
From the article above:
Note This guide is designed to help you port your Windows Phone Silverlight app to Windows 10 manually. In addition to using the information in this guide to port your app, you can try the developer preview of Mobilize.NET's Silverlight Bridge to help automate the porting process. This tool analyzes your app's source code and converts references to Windows Phone Silverlight controls and APIs to their UWP counterparts. Because this tool is still in developer preview, it does not yet handle all conversion scenarios. However, most developers should be able to save some time and effort by starting with this tool. To try the developer preview, visit Mobilize.NET's website.
[1] Can a Silverlight out-of-browser app be converted to Universal Windows Platform (UWP) app?
We already have a working and fully functional app working on store in Windows phone 8 silverlight framework. But keeping in Mind windows 10 will be releasing soon we want to be ready. We want to migrate the app to WinRT framework. What would be the best approach to do that.
I see there are a lot of changes at the framework level but still any suggestion would be appreciated.
Thanks
Vinod
There's a MSDN article that targets the describes problem. The most interesting part is probably the mapping of silverlight namespaces to the corresponding WinRT namespaces (if available).
Here is an article about an app by Rudy Huyn to convert Silverlight application to universal apps. That could also be a great help.
I have a Windows Phone 8.1 Silverlight application which is in the store now. Since i see that Microsoft is moving all the attention towards WINRT and Universal Apps, i suspect that there will be limited or no support for Silverlight Apps in Windows 10.
There might be a tablet project that i might roll out for the same project in the future. So i am in the dilemma to convert the Silveright projects in my solution to WINRT or convert them into Universal Apps.Also, i hear that converting to Universal projects are pretty hard as well.And I understand that the bulk of the work will be in porting the UI to Hub Style UI.
Any ideas? Comments on the best approach to take here.
A WinRT app is a Windows only app (not for Phone). Other than that, WinRT and Universal apps are quite similar. They have the same namespaces, classes, controls... almost everything. You can use many WinRT libraries in Universal apps without any problem. And so, porting to them is generally the same, too.
Windows Store and Windows Phone apps generally need different UI anyway, so you would have to work on that, no matter what you do.
One difference is that a WinRT app would work on Windows 8.0 and up, and a Universal app would require Windows 8.1 (or WP 8.1 for phones). Actually, a Windows 8.1 app IS a Universal app. Just like a Windows Phone 8.1 app (not the Silverlight variation) is a Universal app.
I'd recommend porting to a Universal app as you would get used to working with these apps, and they work on both platforms (Windows and Phone). For any future project, that's the way to go.
In the company I work for, we switched to Universal apps a few months ago. Figuring out what UI we would use on both platforms and how to do it properly, as well as porting our existing libraries did take some time (not too much), but now making a new app and supporting both platforms is very easy. So, for me, that's the way to go.
It is quite unlikely that Microsoft will stop supporting Silverlight Apps in the Windows 10 version for phones. Even WP8.1 still supports XNA Games from the WP7.0 era.
Depending on the APIs you are using in your libraries the majority of changes when converting from Silverlight to WinRT will be on the UI side, e.g. if your Silverlight App already uses the LocalStorage-APIs instead of the IsolatedStorage-APIs that won't even have to be changed.
My advice would be the following:
evaluate wether all functionality you need is supported in Universal Apps (some functionality is currently only available in Silverlight Apps)
evaluate wether the actual APIs you are using are supported in Universal Apps or need to be replaced (IsolatedStorage => LocalStorage, etc.)
Armed with that knowledge I'd guess you will be able to better plan on when to port your App to the new APIs. If a tablet version is likely in the future and all required APIs are supported in the Universal App Model porting sooner will likely require less effort than porting later.
I want to use windows 7 features like icon overlay, and thumbnail tasks but my question is that can i do it without using any other API on just my plain .net 3.5. i recently enabled jumplists on an application in my c#.net 3.5 using the Shell routine so can something like that be done for icon overlay and other windows 7 taskbar features.
And can old application like notepad which i am sure was made years ago use these new feaures?
I guess it depends on the meaning of "use". You get jumplists for free if you use the Common Files Dialog. If your app is WPF or MFC, you get some Windows 7 stuff in the latest version of those libraries (not 3.5). Failing that, you will need to either ask Windows directly (use an API) or use a library that isn't part of .NET 3.5 that will ask Windows for you. I recommend you use the Code Pack. One line of code for an overlay icon, for example. It also has non-visual Windows 7 features like Restart and Recovery, Power Awareness (.NET events when the machine goes on battery etc). It was last updated November 18th 2009 and I am expecting a new release any day now.
If you really don't want to use .NET wrapped taskbar functionalities,
you can try this link that calls overlay via PInvoke. For other W7 taskbar options you can check on the same site.
Anyway I suggest you to use the .NET managed API