What properties need to be adjusted if you had a navigation bar on the side and wanted to scroll down your application to a specific label or height/distance?
Something like:
if clicked
set scrollheight/height/etc to height
Related
I am trying to align few buttons and a textbox, like the Google Chrome browser address bar, which stretches itself when the user maximizes windows form.
I tried anchor and dock, but 1st control from the left and last control from the right side align themselves but other middle controls stays put.
Please anybody tell me how to properly align controls?
Here's my controls in panel:
After stretch:
Don't use Dock property. For the controls before the TextBox, leave the Anchor property to default, i.e., Left, Top.
For the TextBox, set the anchor to Left, Right, Top.
And for controls after the TextBox, use Right, Top.
This will resize only the TextBox when you change the window size.
I'm trying to come up with an idea on how to create an app bar similar to the one in the Facebook app for WP8.1. This is a screen:
As you can see, that white bar with some buttons on it hides at the top of the screen. This is what I thought:
• Use a Grid or a Canvas for the body of the status bar
• Add all the buttons/stuff inside it and manage them on their own
• Add an eventHandler for the ViewChanged event of the ScrollViewer I have inside my page: if the user has panned down, animate the status bar. If the user has panned up, hide the status bar.
The problem I have is this: my first Idea was to use a DoubleAnimation on the Y Property of the TranslateTransform Property of my base Grid/Canvas.
The problem is that if I use that, the element will move above anything else that's on screen.
So for example, if I have a title inside my page, then this status bar and a ScrollViewer, if I try to translate the status bar up it will cover my title.
Another idea was to use a ThicknessAnimation to animate the upper Margin of my base Grid/Canvas, but on WinRT there isn't a ThicknessAnimation.
And other than that, I know that a ThicknessAnimation is never a good idea as it has to update the whole visualtree at each iteration.
Any ideas? I'm wondering how did they do that inside their app :D
Thanks!
Sergio
You can research Canvas.ZIndex for arrange order control to get the top bar to be on top of the second bar. You can also try the Clip property.
I have a windows form with two controls, one mail control (Dock = Fill) and a property control (Dock = Right). The property control is set to AutoScroll. It has some expandable panels and if the user expands too many panels the height of the control is larger than the window height and I set the AutoScroll property in order to automatically display scrollbars in this case - this does work. However the scrollbar is plotted over the property controls. The scrollbars of course needs some place but I would like the property window to grow in width as long as the scroll bar is shown (and hence reduce the size of the main control a bit) so that the scrollbar is on the right side of the property control which is completely shown.
Can you give me a hint? Do I need to change some properties of the controls? Or is there an Event "ScrollBarsShown" or something which I could catch and manually extend the width of the property control?
Thank you very much!
Put these controls in a TableLayoutPanel. The arrangement should be two columns, one row. Column0 would be set to 100%, while Column1 would be AutoSize. The Row could be either.
Then just dock fill the TableLayoutPanel in your form.
I am developing an application that will use touch screens to navigate for use in a warehouse environment.
There is a need to present a list to the users and because this list could be quite long, the user will at some point need to scroll down the list.
As you all know the system scroll bars for panels and textboxes etc is quite small and I would like to know if I can either resize the controls that make up the scroll bar (the little arrows at the top and bottom, and the place holder bar in the scroll bar itself), or if I can create a couple of buttons that can scroll up and down my control for me?
Thanks,
Karl
Answer pulled from this post.
Check this out:
Winforms - Adjust width of vertical scrollbar on CheckedListBox
Worth mentioning too:
.NET Compact framework - make scrollbars wider
More of the same, but this time with a better solution through the use of the scrollbar control:
Change the width of a scrollbar
Another one in which the guy teaches how to create your own scrollbar control (interesting):
Set the Scrollbar width of a DataGridView
The last one (worth trying):
Is there a way to get the scrollbar height and width for a ListView control
You can add your own scroll buttons and programatically scroll like so:
myPanel.VerticalScroll.Value++;
Simple question I hope.... I have a Win Form with a Tab Control and 12 tabs. When I added the eight table (and higher), the scroll bar in the tab header appears and you have to scroll with that control to view the extra tabs. How can you change the layout so that the tabs all show, without the scroll bar? Is it possible to have them appear "stacked" or "Multiline"?
Set the Multiline property to true.
tabControl1.Multiline = true;
As simple as that.
I don't think I've seen what you're describing before unless for some reason I've accidentally haven't set the proper width of the control. Have you tried setting the width to something less than the width of the area you're describing....and maybe make sure to use a pixel value vs. a percentage just to narrow it down perhaps.