Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WinMobile
Microsoft Visual C# 2010
Microsoft Windows Phone Developer Tools 7.1 (Beta) - ENU
Microsoft Visual Studio 2010 Ultimate - ENU Service Pack 1.
Thanks for any idea.
 
Can I use FocusAtpoint(double X, double Y) method for solving this problem?
But I don't see FocusAtpoint(double X, double Y) method is listed in PhotoCamera [from metadata] when I press F12 on PhotoCamera in text editor.
 
Thanks.
Posted 10-Mar-12 6:25am
Edited 10-Mar-12 8:09am
v2
Comments
StarStarStarStarStar at 10-Mar-12 11:47am
   
Can i use FocusAtpoint(double X, double Y) method for solving this problem?
But i don't see FocusAtpoint(double X, double Y) method is listed in PhotoCamera [from metadata] when i press F12 on PhotoCamera in text editor.
help me, please!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It's there, look at the class Microsoft.Devices.PhotoCamera, http://msdn.microsoft.com/en-us/library/hh239226%28v=vs.92%29.aspx[^].
 
Don't forget that this function may or may not be supported by the device. Please use Microsoft.Devices.PhotoCamera.IsFocusAtPointSupported.
 
I don't understand how exactly you were trying to get the the metadata, but there are at least two ways to get there. First, you should have the assembly "Microsoft.Phone.dll" referenced in your project. In the Solution Explorer, click on the correspondent node project node, a child not of the "References" node. The meta-data browser will be shown in a code window, browse it.
 
The second way is to declare some object of this type and make sure you successfully compile the project. Then place the caret to the name type and use context menu item "Go to definition".
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Thank for your solution.
My project reference have "Microsoft.Phone.dll".
 
I place the caret to the PhotoCamera and use context menu item "Go to definition". and i get this:
#region Assembly Microsoft.Phone.dll, v2.0.50727
// C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Phone.dll
#endregion
 
using System;
using System.Collections.Generic;
using System.Security;
 
namespace Microsoft.Devices
{
    // Summary:
    //     Class that represents the basic camera functionality for a Windows Phone
    //     still camera application. Includes members for enabling and configuring functionality
    //     such as image capture, focus and flash mode. Also, it contains the primary
    //     focus events, image acquired event, and image saved event.
    [SecuritySafeCritical]
    public sealed class PhotoCamera : Camera
    {
        // Summary:
        //     Initializes a new instance of the Microsoft.Devices.PhotoCamera class.
        public PhotoCamera();
 
        // Summary:
        //     Returns a collection of the available preview buffer resolutions.
        //
        // Returns:
        //     Returns System.Collections.Generic.IEnumerable<t>. Collection of available
        //     buffer preview resolutions.
        public IEnumerable<captureresolution> AvailablePreviewBufferResolutions { get; internal set; }
        //
        // Summary:
        //     Gets or sets the flash mode. Unsupported flash modes silently default to
        //     "off".
        //
        // Returns:
        //     Returns Microsoft.Devices.FlashMode. The flash mode.
        public FlashMode FlashMode { get; set; }
        //
        // Summary:
        //     Gets or sets the preview buffer resolution.
        //
        // Returns:
        //     Returns Microsoft.Devices.CaptureResolution. The resolution of the camera
        //     image capture.
        public CaptureResolution PreviewBufferResolution { get; set; }
        //
        // Summary:
        //     Represents the current YCrCb plane layout for GetPreviewBuffer.
        //
        // Returns:
        //     Returns Microsoft.Devices.YCrCbPixelLayout. Pixel layout.
        public YCrCbPixelLayout YCrCbPixelLayout { get; }
 
        // Summary:
        //     Provides data for the Microsoft.Devices.PhotoCamera.AutoFocusCompleted event.
        public event EventHandler<cameraoperationcompletedeventargs> AutoFocusCompleted;
        //
        // Summary:
        //     This event occurs when the capture sequence is complete.
        public event EventHandler<cameraoperationcompletedeventargs> CaptureCompleted;
        //
        // Summary:
        //     This event is occurs when the capture sequence is complete and an image is
        //     available.
        public event EventHandler<contentreadyeventargs> CaptureImageAvailable;
        //
        // Summary:
        //     This event is occurs when the capture sequence has started.
        public event EventHandler CaptureStarted;
        //
        // Summary:
        //     This event occurs when the capture sequence is complete and a thumbnail image
        //     is available.
        public event EventHandler<contentreadyeventargs> CaptureThumbnailAvailable;
 
        // Summary:
        //     Cancels the current focus operation.
        public void CancelFocus();
        //
        // Summary:
        //     Captures the current image displayed in the viewfinder.
        public void CaptureImage();
        //
        // Summary:
        //     Starts a camera auto focus operation.
        public void Focus();
        //
        // Summary:
        //     Copies the current viewfinder ARGB frame into a buffer for further manipulation.
        //
        // Parameters:
        //   pixelData:
        //     The ARGB pixel data.
        public void GetPreviewBufferArgb32(int[] pixelData);
        //
        // Summary:
        //     Copies the luminance data for the current viewfinder frame into a buffer
        //     for further manipulation.
        //
        // Parameters:
        //   pixelData:
        //     The YUV pixel data.
        public void GetPreviewBufferY(byte[] pixelData);
        //
        // Summary:
        //     Copies the current viewfinder frame into a buffer for further manipulation.
        //
        // Parameters:
        //   pixelData:
        //     Pixel data.
        public void GetPreviewBufferYCrCb(byte[] pixelData);
        //
        // Summary:
        //     Determines whether a particular flash mode is supported on the device.
        //
        // Parameters:
        //   mode:
        //     The flash mode.
        //
        // Returns:
        //     Returns System.Boolean. True or False on whether the mode is supported.
        public bool IsFlashModeSupported(FlashMode mode);
    }
}
</contentreadyeventargs></contentreadyeventargs></cameraoperationcompletedeventargs></cameraoperationcompletedeventargs></captureresolution></t>
I don't see IsFocusAtPointSupported property and FocusAtPoint function.
Please, help me!
 
Microsoft Visual C# 2010
Microsoft Windows Phone Developer Tools 7.1 (Beta) - ENU
Microsoft Visual Studio 2010 Ultimate - ENU Service Pack 1.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I uninstalled Microsoft Windows Phone Developer Tools 7.1 (Beta) - ENU and install the release version http://www.microsoft.com/download/en/details.aspx?id=27570[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 515
1 Maciej Los 340
2 Richard MacCutchan 265
3 BillWoodruff 225
4 Mathew Soji 155
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 12 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100