Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
0 out of 1 rated this helpful - Rate this topic

Customizing the Bing OCR Control

Bing

This article is obsolete. It shows how to change the appearance and functionality of The Bing Optical Character Recognition (OCR) Control by replacing the XAML template for the control.

Published date: March 4, 2014

Dn261738.Warning(en-us,MSDN.10).gifCaution:
The Bing OCR Control is deprecated as of March 12, 2014.

Modifying the OCR Control

The OcrControl Class inherits from Windows.UI.Xaml.Controls.Control, which provides properties to change some of the global aspects of its appearance, such as size, color, and border thickness. But to make more specific changes, such as adding a button or changing the order of visual elements within the control, you must edit or replace the control template.

To edit the control template

  1. From the Toolbox in Visual Studio, drag an OcrControl onto the design surface.

  2. Right-click the OcrControl instance and select Edit Template, and then select Edit a Copy…

    The Create ControlTemplate Resource dialog opens.

  3. Name your template.

  4. Under Define in, select This document, and then select your current control from the dropdown list and click OK.

    The dialog closes, and the following markup is added to your OcrControl instance.

    <Ocr:OcrControl.Resources>
        <ControlTemplate x:Key="OcrControlControlTemplate1" TargetType="Ocr:OcrControl"/>
    </Ocr:OcrControl.Resources>
    <Ocr:OcrControl.Template>
        <StaticResource ResourceKey="OcrControlControlTemplate1"/>
    </Ocr:OcrControl.Template>
    
  5. Edit the ControlTemplate element as described in Customizing the Appearance of an Existing Control by Creating a ControlTemplate.

Additional resources

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.