I have an existing Winforms project that currently runs on our Win 7 machines. Now I need to add camera access to it so that we can also run it on Win 8.1 tablets and take photos.
I understand that I can build WPF application for Win 8.1 to access camera.
I know that I can run my Winforms application on Win 8.1 as is.
My question is - do I have to rewrite my whole winforms application into Win 8.1 WPF to get access to the camera, or I can somehow create just the image capture form in Win 8.1 WPF and call it from my existing Winform application?
I was hoping that creating WPF Custom Control would work, but it seems that I only can create WPF Custom Controls for Windows 7, not for Win 8.1.
My question is - do I have to rewrite my whole winforms application
into Win 8.1 WPF to get access to the camera...
You can use Version to check if an OS is Win8, then do appropriate actions.
Version win8Version = new Version(6, 2, 9200, 0);
if (Environment.OSVersion.Platform == PlatformID.Win32NT &&
Environment.OSVersion.Version >= win8Version)
{
// Win8 or higher
}
else
{
// Do something if it isn't
}
Related
I have a simple question : Is it possible to create a windows 10 app (tablet for my case) in WPF instead of UWP ? Because actually my app need a framework that allow to create pdf, but none free framework exist in UWP yet, but un WPF this is quite different. Thank you.
WPF apps are fully supported on Windows 10, so nothing stops you from using WPF instead of UWP!
In fact, you can even take advantage of UWP features in WPF apps by using the Desktop Bridge (Centennial)
I am new in windows app development. Actually I want to develop an app for Windows surface pro 4 tablet using WPF(XAML). So I have to use Plain WPF application or Surface SDK ? I am not sure that Plain WPF application will support for surface tablet. Am I correct?
I am starting to develop a Windows phone (Silverlight) 8.1 application and one thing I wanted to create was a user control. I noticed on the normal windows phone templates for a WP project in VS2013, there is a template for user controls, but not when in a Silverlight 8.1 project. What would be a good starting point for this? Is it the same as a windows phone user control? I am having a hard time finding tutorials on how to do this specifically for Silverlight.
This is a new Windows Phone 8.1 Silverlight project and these are the options you see. I believe a Windows Phone User Control is what you want.
The naming conventions changed probably because the new non-Silverlight Windows Phone User Control uses the WinRT naming convention, using: instead of clr-namespace:, so these components are not shareable between Silverlight and non-Silverlight projects.
We have an in-house .net 2.0 winforms app currently developed on Visual Studio 2005 in Windows XP. Everyone in the office until now is running Windows XP, and there are no issues.
We recently ordered a new computer with Windows 7 for one of our managers we were hoping to use, and the app installs fine. The issue is the spacing around every label, textbox, and button - making some forms not fit.
Is there some setting that we can use to make Windows 7 display each control where it is placed in our XP development environment and like the rest of our XP clients show?
Ugh, what kind of idiot management team gives a new machine to a manager instead of a programmer?
Control Panel + Display, Advanced tab, change the DPI setting to repro the problem on your XP machine. Read the docs for the Form.AutoScaleMode to find out what's going on.
I'm looking to put an application window behind all other windows.
I was thinking of using .NET 4 and WPF or Silverlight.
I don't have any specific drawing code, I just want my application window as my desktop wallpaper while retaining the interactivity (no mucking around with screenshots etc).
Is this even possible and if so, how?
Edit: I'm using Windows 7 x64.
Edit 2: I know the desktop is drawn to a window with id 0 (or something like that). Can't I use interop calls to put my window as a child of window 0?
For Windows XP and previous versions, use Active Desktop ad set a web page that runs a Silverlight application.