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:

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>)

 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[]

inkCanvas1.PreferredPasteFormats = formats;

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

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

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

Community Additions