This documentation is archived and is not being maintained.

InkCanvas.PreferredPasteFormats Property

Gets or sets the formats that can be pasted onto the InkCanvas.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public IEnumerable<InkCanvasClipboardFormat> PreferredPasteFormats { get; set; }
/** @property */
public IEnumerable<InkCanvasClipboardFormat> get_PreferredPasteFormats ()

/** @property */
public void set_PreferredPasteFormats (IEnumerable<InkCanvasClipboardFormat> value)

public function get PreferredPasteFormats () : IEnumerable<InkCanvasClipboardFormat>

public function set PreferredPasteFormats (value : IEnumerable<InkCanvasClipboardFormat>)

<object>
  <object.PreferredPasteFormats>
    InkCanvasClipboardFormats
  </object.PreferredPasteFormats>
</object>
 InkCanvasClipboardFormats  An array of InkCanvasClipboardFormat enumeration values. Specifying an array in XAML requires x:Array usage, and specifying an enumeration value as an element that declares an array member requires x:Static usage. For more information, see x:Array Markup Extension and x:Static Markup Extension. 

Property Value

A collection of the enumeration values. The default is InkSerializedFormat.

The following example sets the PreferredPasteFormats to make the InkCanvas accept Extensible Application Markup Language (XAML) format, Ink Serialized Format (ISF).

InkCanvasClipboardFormat[] formats = new InkCanvasClipboardFormat[]
                            { 
                              InkCanvasClipboardFormat.InkSerializedFormat,
                              InkCanvasClipboardFormat.Xaml
                            };

inkCanvas1.PreferredPasteFormats = formats;

The following example accomplishes the same thing in Extensible Application Markup Language (XAML).

<InkCanvas>
  <InkCanvas.PreferredPasteFormats>
    <x:Array Type="{x:Type InkCanvasClipboardFormat}">
      <x:Static Member="InkCanvasClipboardFormat.Xaml" />
      <x:Static Member="InkCanvasClipboardFormat.InkSerializedFormat" />
    </x:Array>
  </InkCanvas.PreferredPasteFormats>
</InkCanvas>

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: