开发者

Can I invert the colours of the phone screen within my application?

开发者 https://www.devze.com 2023-01-11 05:22 出处:网络
As part of 开发者_高级运维my first WP7 app, I\'m giving the user configuration options to alert them to the completion of a task:currently I have the option to vibrate the phone, but I would like to \

As part of 开发者_高级运维my first WP7 app, I'm giving the user configuration options to alert them to the completion of a task: currently I have the option to vibrate the phone, but I would like to 'flash' the screen my inverting the colours and back again.

However, I can't figure out how to invert the screen colours. Is this possible?


Commentary portion: Why do you want to do the "flash"? Wouldn't some other standard notification be more appropriate? I've never seen a flash behavior on a phone, so if i saw the colors invert and go back in an app, i'd figure there was something wrong with my phone!

Answer portion: What about just making a rectangle the full size of the screen that is white but partially transparent? or black and partially transparent, or both.

That way you don't need to "invert" anything, simply animate the opacity of the rectangles(s)

If you do it that way you could get different effects, like different color overlays for different conditions?


You could capture your app's screen as a WriteableBitmap, invert the colors and display it in an animation for a short period of time. Inverting colors of a bitmap would be like this (sample is for WPF).

0

精彩评论

暂无评论...
验证码 换一张
取 消