I'm building a very simple video player in Silverlight (using Expression Blend 4), and I want to have an Image that comes from the same image file as another Image. (The image files are just in the root of my project.) If someone selects my first video thumbnail in one area, the detail view for the selected video also includes this thumbnail.
I'd love to just do this (in the C# code-behind):
videoDetailImage.Source = _currentThumb.Source;
But it seems to have no effect. I've played around with:
videoDetailImage.Source = new BitmapImage(new Uri("t01-artifact.jpg", UriKind.Relative));
And that doesn't work either. I've even tried grabbing images from the web and going UriKind.Absolute - still nothing shows up.
Update: I actually gave up on this and did a very lazy thing of just putting all the images I needed into the app and toggling their Visible / Collapsed states. It's a piece of junk, but all that mattered was that it work.
Related
Our app shares a custom open graph story that included a 1200x630px preview image. The preview image however always displays as a small square when posted to the Facebook timeline.
As mentioned here, the header of the website I'm linking to already contains og:image and og:image:width and og:image:height. Still the image is cropped and only a square on the left is visible.
Is there any trick to make the image use the full width? User generated images are not the solution to go for because it removes the link from the open graph object and also stores the image in the user's photo albums.
I know that this has to be possible somehow because it works for apps such as Runtastic Results.
I want to show some image in a flash. When I click an image, the image is up as like as image shown below.
when i click the image:
but the problem is when i click the image in that group, there is a gap between images. I want to attach them. I can not solve the problem. please anybody help me to solve the problem.
If you're using Flex, this is fairly trivial. You set the cards in an HGroup (calculating the gap will be difficult, but not impossible) and simply remove selected cards from that group and place them in another. After the card is removed, your other cards will be realigned by the layout automatically.
If you're not using Flex, I suggest extracting the code you used to layout the cards in the first place into a separate function. When a card is selected, you move the card out of the DisplayObjectContainer it is currently in and place it in another and then simply call the layout function again. This is the same method as I would use with Flex, although a little less automated due to the lack of Flex's layout engine.
I don't remember how it started, although I believe it began after using 3D tools at one point. I was looking for TWO answers, if possible:
For some reason, I find this hard to describe in words, so following the description is a link to a screenshot.
When I open, or create a new image followed by pasting an image from the Clipboard, in Photoshop, there is this zone at the top-left of the image window containing a smaller image, which is surrounded by an area that appears to be transparent - but when clicked on, or the window itself is moved, this "picture-in-picture" feature disappears - then comes back after the dragging is finished.
SCREENSHOT: http://i.imgur.com/MJq8I1W.jpg
1) What is this "feature" named?
2) How do I turn it off?
Thank you!
I don't think I can tell what you hit, or where this is located from the image you shared... can you upload a more comprehensive interface snapshot? It feels like you simply have a duplicate layer on top of your main layer...
Perhaps take a look at your workspace settings and try going to essential and see if that preview panel goes away.
I am trying to download a number of images, of differnet sizes, then after some cropping stitch them into one single image.
I am intending to do this in code on a WP7 device
My current approach uses n Image controls and waits for their ImageOpened events to fire. Once they have all been successfully opened I create a new Image for each and stick them into a StackPanel.
In then use WriteableBitmap to create a single image from the stacked images.
This code works 40/50% of the time. The rest of the time the layout engine decides to not bother laying them out in a horizontal stack. All the images get rendered on top of each other.
Is there a way of forcing the StackPanel to do a full layout pass? I have tried combinations of Arrange and Measure on both the Images and the StackPanel.
I found the article WP7: Generate Live Tile Images Locally (Without The Visual Tree). I am now using Henry Chong’s approach (which includes UpdateLayout) and my photo stitching is working great.
I cannot help but be amused by the fact that the answer to my question “how the hell do I force the layout to be updated” was answered with a method called “UpdateLayout” [dev exits stage left kicking himself]
I would like to loop through a sequence of images. I have tried using a Pivot control, but I don't like the blank space in between image transitions. I would prefer to use something that will animate between images smoothly. I also looked at the LoopingSelector control, but I can't seem to set the orientation to horizontal.
I'm assuming you're interested in a kind of image viewer like iOS offers, swiping right or left to navigate through the photos. If that's the case, I hate to say it but i think you're looking at building your own control.
I think to implement it properly these are the essential things you need to think about and address:
For performance' sake, load all the images you have into memorystream objects and store the binary data (you can get creative with this and only store the first 10-15 images, depending on how large the images are, doing this would enable your control to support thousands of images and still perform like a champ).
Once an image is about to be on-screen set the source of the image to the saved memorystream object that has the bytes loaded into it (this will minimize the work that the UI thread does, keeping the control performant and responsive)
Use Manipulation events to track the delta x of the motion someone uses when swiping left to right in order to actually perform the moving of the items
Move the images by changing their Canvas.Left property (you can go negative I think, otherwise just make your canvas the width of all the images you have combined)
Look up some of the available libraries to support momentum so you can have a natural smooth transition between images