In my wp8 silverlight app I use the MediaViewer control for displaying / swiping through pictures. Now I'm trying to port my app and the MediaViewer control to winrt for windows phone 8.1 and windows 8.1.
The images are rendered in a ViewportControl. This control is not available in winrt. What can I use to replace this control?
Some code:
<ViewportControl x:Name="Viewport">
<Canvas x:Name="Canvas">
<mediaViewer:ThumbnailedImageViewer
x:Name="ZoomableContent"
CacheMode="BitmapCache"
RenderTransformOrigin="0,0">
<mediaViewer:ThumbnailedImageViewer.RenderTransform>
<ScaleTransform x:Name="ZoomableContentTransform"/>
</mediaViewer:ThumbnailedImageViewer.RenderTransform>
</mediaViewer:ThumbnailedImageViewer>
</Canvas>
</ViewportControl>
Just use ScrollViewer, Windows Runtime's version of this control is much more powerful than Silverlight's one.
Handle ViewChanged event and read VerticalOffset and HorizontalOffset properties to get offsets. You can use ChangeView() method to scroll to a horizontal or a vertical offset.
In addition, you can easily add zooming :)
Related
I have coded an application in adobe animate using as3 and have published it to my phone (I Phone 6, OS: IOS 12.4.4) for testing purposes.
I am getting black borders at the top and button of the application. This happens with any adobe animate file irrespective of stage-size or publishing-settings. Would anyone know how to fix this?
Thanks a lot!
I believe you need to provide appropriately sized launch images to signal that the app supports those sizes of device:
Adobe AIR: Setting mobile application properties
I looked at the microsoft documentation on how to create an camera application but i got lost quickly. Here is my question:
How to make the screen show what the camera sees? Do you do this using canvas? I'm really stuck guys.. can you help please?
Are you following the sample camera app?
How to create a base camera app for Windows Phone 8.
They use a Canvas and set the background of the Canvas to the Camera's output. It is very simple to follow. Remember to set the Camera Capability <Capability Name="ID_CAP_ISV_CAMERA"/> in the WMAppManifest.xml file.
Is it possible to control camera exposure compensation from ActionScript?
it is! Therefore you need to use a ANE (Adobe Native Extension).
I found one for iOS here https://code.google.com/p/diadraw-air-camera-native-extension/ and maybe this https://github.com/freshplanet/ANE-ImagePicker (supperts iOS and Android) serves for your purpose as well.
Cheers
As far as I'm aware this sort of finer hardware control needs more access to the camera than flash plugin in a web page will have.
You'd be able to do it with a native extension in an AIR application but not with the flash plugin. Though I haven't seen any for desktop cameras, I imagine the hardware is even more variable than Android and would be a big endeavour. Definitely are a few around for Android/iOS (diadraw and I've done one myself for http://distriqt.com/native-extensions#camera).
But for the flash plugin I think you'll be limited to the controls in flash.media.Camera.
I have a demo working where I can render some text over a camera preview in windows phone 8, I now want to extend the app to render xna game content in an augmented reality style over camera preview.
Is this even possible with XNA?
Yes, it is possible
In fact, we are doing it for a game we are making
Check this out
and also
This
Why does WPF lack HTML support? I know there is the Frame. But that shouldn't even be considered a WPF control (not, at least, when it is rendering HTML). I know there is a hack with a floating window, but that's crap!
I just want to show a static HTML document in my WPF application, in a window with rounded corners and a drop shadow. I'm hitting a brick wall, and I'm incredibly frustrated!
HELP!
Can you just embed a web browser control in your WPF app? Your WPF app can then have the nice looking drop shadow around the WebBrowser control, and then WebBrowser control can host your static HTML.
http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/web-browser-control-in-wpf/
you're pretty limited with the functionality built in to WPF. WPF doesn't know how to render HTML on its own - it relies on the native Internet Explorer web browser activex control (aka Trident) to do this. activex controls are rendered in "child windows" on top of any other content in your wpf window. nothing you can really do about this.
the best alternative is probably to switch to a Google Chrome-based control which does not have such a limitation: http://wpfchromium4.codeplex.com/