Open TheXby opened 11 years ago
I am confused. What does blink mean?
I've seen this too. Have a small image that's being tilted. It seems when it's clicked for the first time the image disappears momentarily. After that it works fine.
On Tue, May 7, 2013 at 5:18 AM, Tim Heuer notifications@github.com wrote:
I am confused. What does blink mean?
— Reply to this email directly or view it on GitHubhttps://github.com/timheuer/callisto/issues/194#issuecomment-17519720 .
Tim, this mean that after i click on tilted image, image goes white for a moment and then goesn normar.
I have this problem too and it's quite annoying. Reproduction scenario and detailed description is here: http://stackoverflow.com/questions/16775385/how-to-remove-image-blinking-when-using-tilt-from-callisto-for-controls-with-ima
I had the same issue and I found a workaround. The blinking may be due to the first instanciation of BitmapCache in "PrepareControlForTilt" method of Tilt class:
private static bool PrepareControlForTilt(FrameworkElement element, Point centerDelta, Pointer p)
{
...
_originalCacheMode[element] = element.CacheMode;
element.CacheMode = new BitmapCache();
...
}
Setting 'CacheMode' property of your Image to 'BitmapCache' seems to solve the problem:
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top"
calistoEffect:Tilt.IsTiltEnabled="True">
...
<Image Source="ms-appx:/Resources/Images/MyPicture.png"
Width="100" Height="100"
CacheMode="BitmapCache"/>
</StackPanel>
Thanks Paul for identifying the issue and finding the workaround. That gives me something to go on to perhaps make a more permanent fix.
@timheuer when will this be fixed?