This question already has answers here:
Disable keyboard <enter> key [duplicate]
(5 answers)
Closed 8 years ago.
I'm creating an application that uses XNA and Silverlight. What I want to do is to be able to use shortcuts and commands that IE normally picks up. For example, if I press Control-S, I don't want IE to save the page. I want to do my own action.
Is anything like this possible?
AFAIK you can't do that. Because Internet Explorer has its own behavior and you can't change the way that these behaviors do.
So, you must implement another way to implement shortcuts on your Silverlight's application.
Related
This question already has an answer here:
How to get DPI scale for all screens?
(1 answer)
Closed 4 years ago.
In a multi monitor enviroment, how can I find all screens and their DPI (which might not be the same)?
My users logs on from home via Remote Desktop and many of them have Surface Book which has high DPI and then a second screen with default DPI (96).
I know of the "PresentationSource.FromVisual", but that does not work for getting DPI for all screens.
Pretty simple actually.
a calculation using these values
screen.Bounds.Width;
screen.Bounds.Height;
screen.Bounds.Size;
combined with getting screens using Screen.AllScreens (System.Windows.Forms assembly)
and you're done.
This question already has answers here:
WPF Binding Failure performance hit vs Exception
(2 answers)
Closed 9 years ago.
I have developed a WPF application without resolving the Binding Errors. Now in debug mode we found many binding errors. It is sure that in Debug mode the Binding errors will degrade application performance.
Could someone please tell me whether in Release mode the binding errors will affect the performance? Sharing any valid links supporting these facts will be appreciable.
Yes, you will get performance hits with broken bindings. However, they will be larger hits in debug mode because of the console output.
I suggested fixing the bindings. If you expect null sources use the FallbackValue property of Binding.
This question already has answers here:
Is the size of a Form in Visual Studio designer limited to screen resolution?
(8 answers)
Closed 8 years ago.
I am working on Windows form application. After deploying the application I am getting screens with different sizes in laptop and desktop. This makes some of my menus to disappear and reports to be not shown properly. Do we have a solution for this?
While changing the resolution of my system my form size also getting changing. I want to prevent this.
Make your app with lowest possible resolution (Like: 800x600) and then
Use Panels and when you add your tools into those panels dock them, that might be helpfull, that's what I am using in all my applications and it is going with screen resolution all the time.
I put this section of code in my Load event method:
this.MaximumSize = this.MinimumSize = this.Size;
When a user attempts to double click on the top of the form to maximise it, it stays in the same size. Therefore, maximising the form in this case is disabled.
Make it small enough to fit in the screen having the smallest resolution. And make your forms WindowState as normal. Then you'll see that it fits all the screens. But if you want Maximized state on all screens then you should first apply my first sentence, with #Nidzaaaa's answer.
This question already has answers here:
How to see/test responsive design on multiple devices simultaneously?
(2 answers)
Closed 9 years ago.
I have created a responsive webpage, now i need to check the pages on 3 breakpoints desktop, tablet and android.
Can anyone help for the tools to test the page on different widths
I usually use browser add-on, firesizer for firefox, and window resizer for Chrome.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I've an N-Tier application using Silverlight for the client. The customer as one particular request - I thought was more than reasonable: all actions – including menu navigation – has to be available through keyboard.
When I tried Silverlight 4 I was surprised not to find any menu control so I downloaded several open source and commercial menu controls. I was very disappointed, after having searched for a couple of hours I didn’t manage to find any control that provide a decent keyboard support. Most controls provide no support or some basic support but not one control enabled to gain focus on the first item through the keyboard. You are able to use the keyboard (arrow keys) but you need first to select the control with the mouse! Not one control provided support for Keyboard shortcuts.
Does anyone know of any Silverlight control providing descent support?
Personally I'm glad that a built-in Menu control is not included. I'm not suggesting that your app does need one but at least its forced you to think about it, if you could deliver the functionality without one you would have and that's a good thing.
What it sounds like you are looking for is the menu accessor keys like <Alt>+F. Now here is the thing, for that to work well the API would have to support a page wide keypreview event, allowing the required key combination to be intercepted despite what control has the focus.
Silverlight doesn't provide such an event. The best you can do is a KeyDown or KeyUp event on the UserControl. You can make it a tab stop so that it can get the focus even if there isn't another control in the UI that can get the focus.
However any control which marks a KeyDown or KeyUp event as handled will prevent the UserControl from receiving that event and thereby making the Menu's response to such direct keyboard access appear patchy and inconsistent. This will in turn be interpretted by most users as a bug.
I suspect for this reason the vendors of menu controls don't offer this feature in order that their reputation isn't impinged by what is actually a limitation in the platform.
Bottom line is if you must have this feature you could probably deliver it reasonably well with KeyUp or KeyDown event handling but you need to test the UI rigorously to see if there are any circumstances where it doesn't work.
This menu provides quite a decent solution:
http://sl4popupmenu.codeplex.com/
Due to browser limitations the choice of keyboard modifiers is mostly limited to Ctrl+Alt though.