This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm using the Book control in a Silverlight application. The pages are populated with images. However, I do not know the size or number of images at design time. They are dynamic and added to the Book at run time. I've placed the Book control, with Stretch alignment inside a Grid with Center alignment. I have not set the width or height of either control at design time. When I run the application, the first page appears centered in the browser. When I hover over the bottom right hand corner, the image on the first page suddenly shrinks in size and appears on the left half of the first page, with part of the third page (i.e. the page behind the first page) appearing on the right side of the first page. When I turn the page, the book then doubles in width with pages 2 and 3 appearing correctly. A similar effect happens when I go to the last page and turn back. Is there a way of having the book appear at full width once the images are initially loaded? The width and height of the book cannot be set at design time as the book needs to grow or shrink in the browser, depending on the size of the browser window. I have coded some functionality to cater for this, but have noticed that the page turning functionality is different when turning the right page as opposed to turning the left page. If I set the width at run time, depending on the available space inside the browser window, often when I turn the right page, it ducks behind the page on the left until it completes the flip cycle, then appears on top. This does not happen when turning a left page. Can this difference be explained? Thanks, |
|
|
Hello Michael Sorry about these issues. I've seen both of them before under different circumstances and thought I had gotten rid of them. Overall I have solved all the issues you have described. Here is more information about them: By setting the alignment of the Grid to be centered and setting the alignment of the book to be stretched, the Book control is being forced to 'size to content'. I have fixed the unusual graphical bugs that you have described here, but if the content on different pages have inconsistent sizes, then the size of the book will suddenly change based on the current page. To avoid this, you could either make sure the size of each page will remain consistent, or remove the center alignment of the Grid. As for the unusual clipping being applied to the right turning page, it only occurs when the width of the Book is an odd number. I have no idea why this causes the page to be clipped, but I have solved this also. These fixes are available through the nightly builds from tomorrow the 20th of November. Let me know if there are still any issues and I will solve them. |
|
|
Hello Jason, Just some more information on the issue; there are 24 images, each 1024 pixels wide by 1560 pixels high. As the images are even in width, the width of the Book will always be an even number. The images are also exactly the same size. The Book itself changes size based on the size of the browser window. In full screen mode, the Book fills either the height or width of the window (depending on the dimensions of the images). So the Book needs to "size to content" as you mentioned. I'll try the nightly build as soon as it's available and let you know if the issues are solved. Thanks, |
|
|
Hello Jason, I downloaded the Nightly Build from November 26th. I uninstalled the existing Silverlight Elements and installed the Nightly Build, cleaned the project, re-referenced the DLL, etc Unfortunately, it did not solve my problem. The following is still happening; When I run the application, the first page appears centered in the browser. When I hover over the bottom right hand corner, the image on the first page suddenly shrinks in size and appears on the left half of the first page, with part of the third page (i.e. the page behind the first page) appearing on the right side of the first page. Any suggestions at this point? Regards, |
|
|
Hello Michael I have seen this issue before but have not been able to reproduce it ever since I made the previous changes. There must be some other factor involved. If you could send a sample that demonstrates the issue then that would be excellent. Cheers |
|