I've got a problem with a scrollbar.
I've got 2 updatepanels. 1 that holds a gallery and other updatepanel that holds 2 buttons when button is clicked the pictures in the gallery change.
I've got a problem in my big gallery(holds more pictures) that when clicked on the button the scroll bar is reset to the top of the page and when you scroll down it takes forever so that page gets stuck when it tries to load the picture or repaint them (not sure).
I tried to look for a way to start the scroll bar in the position of the gallery so the user won't be needing to scroll down after loading the picture with the subject he wants to see, but after about a few hours looking for solution I gave up.
I'm using jQuery and ASP.net
If you're only targeting IE add MaintainScrollPositionOnPostback in your page declaration (or config file)
<%# Page MaintainScrollPositionOnPostback="true" %>
Otherwise you'll need to use script to target an element on the page - e.g:
http://blogs.x2line.com/al/articles/156.aspx
Related
I am developing a UWP app for file reader in C#, and I use two UserControl include Image to render the file page bitmaps. Now when user horizontally swipe the either screen, I'd like the file will flip to previous or next two pages, I just update the page buffer directly now, but I want the animation of the flipping page process, the animation effect is simulating turning a real book, can anyone help? So when user swipe on right screen from right to left, page 1 and 2 will turn to page 3 and 4.
I have a page that in this page i have one image and at run time i add 3 buttons but these button come to front of image. how can i send these button to back. i use Panel.SetZindex but not works. thank you.
Have you also used Panel.SetZindex for image control? I think you would have used it just for buttons not for image thats why buttons are still coming in front of image control.
You should set z-index of buttons to least possible value and the z-index of image to highest possible value so that image would comes in front.
Use following code:
Panel.SetZindex(button1,0);
Panel.SetZindex(button2,1);
Panel.SetZindex(button3,2);
Panel.SetZindex(image,3);
Set buttons z-index property to lowest possible number and then add it at run time.
I have 3 pages in my application.
First page: 5 Buttons, each navigates to different page (currently, only the first button works).
Second page: Back Button and ListView, the ListViewItems are UserControlItems with Button, Image and TextBlock. When you click on the Button (of the UserControlItem) it Navigates to the third page, which is Media Player Page with alot of controls.
Third page: Media Player page with alot of controls such as MediaElement, Slider, Buttons and more
When I navigate from Third Page to Second Page using the Back Button, sometimes the screen stays black (the color of the theme) and sometimes it loads too much time. In addition, the ListView has visible vertical scrollbar (always) which is not shown unless you move your mouse on the ListView.
How to fix these problems?
EDIT 1:
link to my project - put some .wmv/.mp3/.mp4 files in the Videos Library folder.
EDIT 2:
I investigated the black page issue abit more and I found that the MediaElement is the cause.
The MediaElement stores the stream and it slows the computer.
In order to resolve to problem, when you click on the GoBack Button, it first set the source of the MediaElement to null, and only when the MediaElementState == Closed, I go back - seems to solve my problem (since I applied the solution I didnt experience more black screens).
About the scrollbar - I think I'll be able to solve it if I simulate MouseOver over the ListView - no idea how to do it
Ok Ill List out the issue one by one.
List View Scroll Bar : Since we are developing for a potential touch surface so scrollbars are not meant to be visible every time.
Blank Page : When you press the back button then Big page Ie third page gets stored in the forward navigation property of the history element. Additionally all the resources that were being used in the third page is disposed. So the time taken to go to second page becomes huge.
Please try havig a fourth page which will have less controls. And see if any Black background issue is occuring or not. It will give a better and clear picture.
--- Update Code for permanent visibility of scroll bar---
Please download the code for listview styling from
Listview styles
add your code to the project
and replace all FadeOutAnimation By FadeInAnimation.
This was the quickest I could do for a solution. For a Better one you can always play with the styles.
Ohh one more thing please add
Style="{StaticResource ListViewStyle1}"
To your list view. please try and let me know.
I want to create a layout that has small panels at the top and bottom and then a main panel in the center that fills the remainder of the window. The main window should have the functionality of a tab panel but instead of simple tabs I want the tab pages to slide on and off the screen. It will be like one large storyboard that slides back and forth and only displays one scene at a time.
So lets assume there are 4 tab pages. Initially the first page will be visible, the 2nd page will be directly off the screen to the right, the 3rd page will be 2 pages off the screen to the right and the 4th page will be 3 pages off the screen to the right. When the user clicks to see the 3rd tab page the layout will slide left 2 pages. Then if the user clicks to see page 1 again, the page will slide back right 2 pages.
The window needs to be resizeable, so I can't use fixed sizes and offset.
Do I just need to use a StackPanel and programmatically set width, height, and position or is there something built-in that I can use?
Hrrrm the first idea that comes to mind is use a ScrollViewer and hide the ScrollBars.
You could then display all your items in a StackPanel in the ScrollViewer, and when you want to scroll an item into view, simply animate the ScrollViewer's position so it smoothly scrolls to the specified item.
i am working on a project in which i have to make a webpage of photographs. In this page i have to show multiple image. User need is that when he click on any image it will zoom but that time it alsoback webpage as background.
You could change the image width and height by javascript, change its z-index so that it comes top of everything when user clicks the image. When user clicks the image second time, change its width and height to normal.
Have a look at this post.
Hope I answer youe question.
try to put invisible Div on your web page (with z-index: 1; display: none;). After Click just put zoomed image on div and make div visible.
You can use a jQuery plugin like #Abdul said. Considering the fact that is a webpage of photographs, and design is important, you should use NivoZoom or my personal favorite fancybox .