Full screen mode in silverlight - asp.net

Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players.

You can set
Application.Current.Host.Content.IsFullScreen = true;
this has to be done from a mouse button event or a click, you can't force the user into full screen without some interaction on their part.
Then you'll need to scale the image. If it's in an element that scales automatically, like a Grid cell and the Grid resizes automatically (like if it's the root element on the page and the page doesn't have a width or height specified) then you're good, but otherwise you'll need to handle the Application.Current.Host.Content.FullScreenChanged event and either resize or apply a scale transform to the image or its container to make it fill the screen, and do the same when you go back to non full screen mode.

Set System.Windows.Interop.BrowserHost.IsFullScreen = true.

Related

ListView set height to show all items without scrolling

In my Xamarin.Forms app I have a ListView and I want to make the height big enough so that it shows all the items without having to scroll. How can I do this?
The point of ListView is to make sure that you can display all the data on any screen size, by using scrolling on a smaller screens that cannot fit all the data.
I am sorry but your question does not make sense. You cannot set a fixed / static height value that will work across different devices. Setting fixed UI size does not make sense on Xamarin.Forms in general unless you will distribute your application for a single device with a fixed screen size.

How to setup views in game maker studio?

How do I get rid of these black bars?
I've looked around and people say how to get rid of them but don't show how its done. This is what I have in my character Creation event.
`///Camera
view_wview[1]=611;//set wiew width
view_hview[1]=611;//set view height
view_enabled[1] = true;//enable view
view_visible[1] = true;//make visible
view_hborder[1]=1920;//set horizontal border for object
view_vborder[1]=1080;//set vertical border
view_object[1]=obj_Medic;//set object to follow
`
You could widen your view to fit your screen or set your game to fit the screen in the display options menu as shown:
The stretching may cause distortions as you can see from my example, an unfinished project I made a while back (a RoTMG simulator).
Window:
Stretched Fullscreen:

Why the layout in qt avoid to show full image of background image for pushbutton

I have problem with layout. I put image for QPushButton background but when I add my button to each layout, it avoid to show full image.
Use size Policy and minimum Height-width. for example you want to expand the button. first select the button and after that choose size Policy to change the size. select Expanding for each property(vertical|horizontal Policy) you want to change. Also you can set the vertical|horizontal stretch. if you want to set limit for it's size you can set minimum and maximum size for your button.
Just look at your object properties, Also look at here. :)

Displaying an image and automatically re-size it

I can't quite figure out what the best way of displaying an image is in my particular case, so hopefully someone on here has a few tips.
I want to display an image that gets re-sized automatically to fit inside the space that is available. I currently do this by creating a class derived from QLabel that implements void resizeEvent(QResizeEvent*) where I do a QPixmap::scaled to re-size the image. The problem is that this only works when the widget is enlarged because the widget doesn't get a resizeEvent when I try to make the widget smaller. I guess that because I set the image to the same size as the widget, it isn't allowed to be sized smaller again? I guess I could try to create a smaller image therefor introducing a sort of "border" around the image which would perhaps allow re-size events to occur when making the area smaller. Any thoughts?
resizeEvent is sent whenever size is changed. It doesn't matter whether it is enlarged or not.
But you can set Policy and Max/Min size to constraint widget in shrinking/enlarging. So if you have your widget not getting resizeEvent AND it doesn't shrink either, then look at your size policy and min width/height. If it shrinks but you doesn't have resizeEvent then you have some error in you logic, I believe.
Alternatively you can use paintEvent for image painting and use QWidget::rect() for your widget width/height.
Try changing the size policy of the label to QSizePolicy::Preferred.
Have a look at size policies in general.

Check if control is on screen

How do I check if a control/DisplayObject is on screen? This means it is displayed on screen so no scrolling needs to be done.
Example: I have several controls on a form. The size of the form exceeds the screen length/width. As a result I need scrollbars. How do I check if a control is on screen?
This is a less elegant solution, but if no one else answers, you can try to do this:
Check X and Y (or just Y if you are interested in height) of the component you want to verify is on-screen or off-screen.
Then compare that to the total height of the application or container of the component.

Resources