How to add fade in/out animation for making a Grid visible programmatically - windows-phone

I am working on a Windows phone app.
I have a Grid which normally is Collapsed. But in some situation, I will programmatically change its visibility to become visible. My question is 'Is it possible to add some fade in/out animation for changing the panel from Collapsed to Visible?
If yes, how can I do that?

You can animate the Opacity property of the Grid. When your grid is to be rendered visible you set the opacity to 0 and start the animation. Don't forget to set the visibility property to Visible before you start the animation and back to Collapsed when fading out.
MSDN: Opacity animation

Related

Controlling the AutoScroll behavior on Panel

I have a set of controls inside of a Panel and set the AutoScroll property of the panel to True so I get the Vertical ScrollBar but when I slide the bar is not smooth and if some of the upper controls inside the panel have the focus the bar return to the top.
I read some about and found a solution on
smooth scroll with autoscroll
Which work Ok but uses a lot of resources, I see it on Windows Task Manager, one of the processors goes about 60%, so I think is something wrong with this.
There's another way to met the same goal?
I tried to put my own VerticalScrollBar unsuccessfully. :(

UIScrollView clickable but not scrollable

I have a ScrollView which behaves like a Slide Show. It automatically slides to the next image and in the end it goes back. But while this happens i don't want the user to slide in the scrollview him self. What i do want is to make each image that slides clickable so that the user can open a specific image for example for more details.
The default setting for the scrollview is userinteractionEnabled = FALSE. No user interaction allowed so the user cant scroll. But this also disables the click on image action. When i set it to true i can click on the image but i am also able to scroll again. So what's the best way for this?
I have considered adding a transparant UIView over the scrollview and make this clickable and check which item was shown in the scrollview. But is there another way for this?
userInteractionEnabled should be set to YES, however, you can set the scrollEnabled property to NO.
With scrolling disabled, you can still adjust the scroll position programmatically, but the user can not scroll. This should work just fine for you.

Stop scrolling scrollbar automatically while adding Images in winforms

I have a thumbnail control where I am adding Images using openfiledialog and after adding it automatically scrolls down.
So I would like to stop scrolling the scrollbar and just append the Images.
I have tried using this code:
Thumbcontrol1.VerticalScroll.Value=0
It worked fine but the scrollbar is at the bottom and it shows me the first row of Images.
And this is my second attempt by doing this way:
I have just set the autoscroll property to false and it hides the scrollbars and I'm stuck with this so how do I scroll the remaining Images?
And Is there any other method to hide scrollbars and just scroll the Images using mouse? Or any other simpler way to get rid of this?
I would try setting autoscroll to false before adding an image, then setting it back to true after the image has been added.

Force Vertical Scrollbar to be Visible in Panel

I have a Windows Forms VB.NET application, with a panel that contains a few other controls.
I set the panel's AutoScroll property to True, and that seems to appropriately apply the scroll bars when they are needed. The issue is that a user must scroll all the way to the right to access the vertical scroll bar. Is there a way to always show the vertical scrollbar no matter where the user is scrolled horizontally?
EDIT
I guess the main problem I have here is that I have a DataGridView inside of a panel. I want the panel to do the vertical scrolling, and not the DataGridView. Why is it when I turn off vertical scrollbars on the datagridview and have autoscroll on the panel, a vertical scroll bar is never shown?
You could add a VScrollBar on the right side of the panel and set code behind to move the panel scroll up and down.
or
A better option may be to switch your panel to a FlowLayoutPanel which provides quite a bit of control over the scroll handles both vertical and horizontal.
Check out MSDN and see how to use all of the properties of the FLP:

Change the width of a scrollbar

Is it possible to change the width of a scroll bar on a form. This app is for a touch screen and it is a bit too narrow.
This is a Windows Forms application? I was able to make a very fat and thick scrollbar by adjusting the "Width" property of my scroll bar control.
Is your scroll bar something you have programmatic access to (i.e. it is a control you added to the form)?
The width of the scrollbars is controlled by Windows. You can adjust the scrollbar width in Display Properties and it will affect all windows on the terminal.