XAML 中 Canvas 的 WPF 图标

WPF Icons from Canvas in XAML

我有一个包含以下内容的 XAML 文件,appbar.add.xaml:

<?xml version="1.0" encoding="utf-8"?>
<Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="appbar_add" Width="76" Height="76" Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
    <Path Width="38" Height="38" Canvas.Left="19" Canvas.Top="19" Stretch="Fill" Fill="#FF000000" Data="F1 M 35,19L 41,19L 41,35L 57,35L 57,41L 41,41L 41,57L 35,57L 35,41L 19,41L 19,35L 35,35L 35,19 Z "/>
</Canvas>

我的问题是,如何在我的项目中使用这个 "image" 作为图标?

这是我处理 png 文件的方式:

<RibbonButton x:Name="ButtonListNew" Label="Neu" KeyTip="I" LargeImageSource="Images\Resources\appbar.add.xaml" Command="l:MainWindow.RoutedCommandListNew" />

我不知道 RibbonButton 是什么,但我知道您可以使用按钮来完成此操作。

<Button>
    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="appbar_add" Width="76" Height="76" Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
        <Path Width="38" Height="38" Canvas.Left="19" Canvas.Top="19" Stretch="Fill" Fill="#FF000000" Data="F1 M 35,19L 41,19L 41,35L 57,35L 57,41L 41,41L 41,57L 35,57L 35,41L 19,41L 19,35L 35,35L 35,19 Z "/>
    </Canvas>
</Button>