I am writing a WPF application using Csharp. Its a touch application that has four browser windows displayed. Two upside down. The screen will be built into a table and lie flat. Four people will use the table - two on one side and two on the other. Thus the need for the upside down (or 180 degree rotation) browsers. I have tried using SilverLight and its Browser Brush. This works to display the browser content upside down BUT to interact with the browser you have to make the browser control active (instead of the Brush) and this turns the content back the right way up. I guess what I need is a Browser control that can be rotated in the normal way and work rotated. IE in Dot Net wont work.
Sascha Barber and Chris Cavanagh have blog posts about an alternative WebBrowser Control based on Chromium that behaves like a real WPF control. Check out http://sachabarber.net/?p=597 and http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/
If it is WPF application you can use a simple RotateTransform to rotate controls any degree you want. So upside down should be no problem.
Sample/Tutorial
Related
I have a C# application that has an existing WinForm that I now need to display upside down.
The application will be displayed on a touchscreen Windows 7 device. If two people are using the device, one person is viewing it right-side-up while another user will be simultaneously viewing it upside-down. I will need to have one control displayed right-side-up while another control is displayed upside-down, each duplicate forms. Both need to be functional. It is not necessary for the title bar and Windows close, maximize, and minimize to be rotated.
Is there a way to easily rotate this Form and all of its contents without having to rewrite it from scratch?
Unfortunately, rotating controls is not directly possible in WinForms.
At least, not if you want them to retain their functionality. It would be relatively simple to draw the control into a bitmap, rotate the bitmap, and then draw that back to the desired location on the form. But you would obviously lose the ability to interact with the controls. They would just be static representatives of their original selves.
But making functional upside-down controls just isn't going to happen. I mean, you could try to write a bunch of custom drawing code for owner-drawn controls, but you'll still run into a bunch of bugs, corner cases, and compatibility problems. The Win32 controls that WinForms is based on just don't support this. No big surprise, really, considering they were invented some 20–25 years before anyone thought of computer screens that you could carry around in your pocket and rotate in any direction. There is a good reason that UI technologies like WPF came out around the time that touch screens and tablets did.
There are some possibilities that can be explored when it comes to flipping the entire screen, but that's not going to help when you want different controls going different directions. (And I guess it betrays my vantage point as a desktop app guy when I say this, but that just sounds like an incredibly confusing UI.)
If you absolutely have to have this, someone else is going to have to give you another route to hack it, perhaps along the lines of Dhawalk's comment: hosting the WinForms control inside of a WPF app that does provide built-in support for rotated controls. I don't know enough about this to make any concrete suggestions down that path. From a few minutes of searching, it appears that WindowsFormsHost does not actually support rotation transforms, so this may be a non-starter anyway.
I am trying to create Windows 8 Metro App First Time.
I have worked on all three (C#, VB and JavaScript) languages.
I first created Grid App template (JavaScript Language). Everything looks fine. Scrolling was working through touch pad (two finger scrolling) in JS.
But When I created same Grid App in C#. What I found Horizontal Scrolling using two finger not working. I can only scrolling by dragging scroll-bar. Size of scroll-bar (thing that I pick, not whole scroll-bar) is also variable. It is taking around half of the scroll-bar size but when I move it to the right, Its size is getting small. I don't see any such behavior if I create same Grid App in JavaScript language.
Is any one else is facing same problem..??
I have also seen this problem in many apps that I have installed from store like 'NDTV' and a few more. May be these are developed in C#.
How can I get two finger scrolling working in C#..??
In meanwhile I am requesting to Create a tag something like metro-apps who have reputation more than 1500.
I'm adding a video chat component to an existing application that will have picture in picture functionality. My questions is, due to the "airspace" problem, how can picture in picture be accomplished?
I have two activeX controls, one for the remote video feed, and one for the local video feed. They are both wrapped in their own border and I would like to show the local video and its border in the corner of the larger remote video feed. The local video renders on top of the remote video just fine (although I'm kind of confused by this because I thought that you couldn't have anything on top of an activeX controller due to airspace) but the border that contains the local video gets rendered behind everything so that you cannot see it. I've tried setting the ZIndex of the border, however, this doesn't work.
I'm just wondering how I can accomplish a form of PiP that is similar to what's used in Skype or Microsoft Lync.
EDIT: Would it be possible to simply use a popup window for the PiP? You could create the illusion that it isn't a popup pretty easily. A popup could render on top of the activeX control right?
upgrade to .net 4.5. Supposedly they solved the "airspace" problem (airspace is solved link). But, given that you are posting here I'm guessing you can't use .net 4.5?
I'm working on a .Net application which has a Google map in it. It is simply done by using the .Net WebBrowser component showing a web page.
It works really good except for one thing:
When I draw circles they have an ugly looking square pattern. At first I just noticed lines, vertical or horisontal but when doing editable circles and made them large enough, a square pattern appers. I does not matter which zoom factor I use, it is always the same amount of pixels between the lines.
If I show the exact same web page in a standard web browser (IE, Chrome or FF) it looks fine so it seems to have something to do with the WebBrowser component. But isn't that using the installed IE version?
Any help will be appreciated!
A picture says more than a thousand words but since I'm a new user at stackoverflow I'm not allowed to post the screenshot....
Best regards,
Mattias
I'm writing an app in C# WPF and I'm hoping to implement a similar kind of touch-based horizontal scrolling that's featured prominently in Windows 8.
At the moment I'm using ScrollViewer with content inside it. This works fine as far as the scrolling is concerned, but it creates problems when interacting with controls inside of it (for example, sliders).
With my limited programming knowledge (a month ago the most I'd done was create a mockup in Photoshop :P), I'd assume this was because the touch hits the ScrollViewer first? Is there some way of flipping this around? I would be happy even if you had to hit a white space to be able to scroll, I just need the user to be able to interact with the controls inside easily without accidentally scrolling all over the place ^_^
Unfortunately, I can't just code for Windows 8 as this is specifically for a bunch of touch-enabled Windows 7 machines.
Look for the Metro theme here you might find some usful style here that you can modify and use..
Also you can check this website for information and guidelines on Metro UI on WPF