InkCanvas.PreferredPasteFormats Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets formats that can be pasted onto the InkCanvas.
public:
property System::Collections::Generic::IEnumerable<System::Windows::Controls::InkCanvasClipboardFormat> ^ PreferredPasteFormats { System::Collections::Generic::IEnumerable<System::Windows::Controls::InkCanvasClipboardFormat> ^ get(); void set(System::Collections::Generic::IEnumerable<System::Windows::Controls::InkCanvasClipboardFormat> ^ value); };
public System.Collections.Generic.IEnumerable<System.Windows.Controls.InkCanvasClipboardFormat> PreferredPasteFormats { get; set; }
member this.PreferredPasteFormats : seq<System.Windows.Controls.InkCanvasClipboardFormat> with get, set
Public Property PreferredPasteFormats As IEnumerable(Of InkCanvasClipboardFormat)
Property Value
A collection of enumeration values. The default is InkSerializedFormat.
Examples
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;
Dim formats() As 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>
Remarks
XAML Property Element Usage
<object>
<object.PreferredPasteFormats>
InkCanvasClipboardFormats
</object.PreferredPasteFormats>
</object>
XAML Values
InkCanvasClipboardFormats
An array of InkCanvasClipboardFormat enumeration values. Specifying an array in XAML requires x:Array
usage. 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.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기