Sunday, 11 August 2013

Windows Phone App State & Camera

Windows Phone App State & Camera

Okay so I'm using the below code to display the camera in my app and it
works great! the problem is when i navigate away and come back to the app
using the back stack the camera is not showing until i call the code
manually.
how can i get it to show automatically ?
Thank Youuu in advance
Dim cam As New Microsoft.Devices.PhotoCamera()
Public Sub New()
InitializeComponent()
SupportedOrientations = SupportedPageOrientation.Portrait
End Sub
Private Sub opening() Handles Me.Loaded
cam = New Microsoft.Devices.PhotoCamera()
viewfinderBrush.RelativeTransform = New CompositeTransform() With
{.CenterX = 0.5, .CenterY = 0.5, .Rotation = 90}
viewfinderBrush.SetSource(cam)
End Sub
Private Sub Closing() Handles Me.Unloaded
cam.Dispose()
End Sub

No comments:

Post a Comment