0

我已经Entypo使用NuGet. 我得到Icons.xaml了包含Canvas'es. 如何在XAML代码中使用它?

文件看起来像:

    <ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
        <Canvas Width="48" Height="48" Clip="F1 M 0,0L 48,0L 48,48L 0,48L 0,0" x:Key="appbar_add">
            <Path Width="24" Height="24" Canvas.Left="12" Canvas.Top="12" Stretch="Fill" Fill="{DynamicResource BlackBrush}" Data="F1 M 22,12L 26,12L 26,22L 36,22L 36,26L 26,26L 26,36L 22,36L 22,26L 12,26L 12,22L 22,22L 22,12 Z " />
        </Canvas>
        <Canvas Width="48" Height="48" Clip="F1 M 0,0L 48,0L 48,48L 0,48L 0,0" x:Key="appbar_alert">
            <Path Width="22.1402" Height="20.75" Canvas.Left="12.9299" Canvas.Top="14" Stretch="Fill" Fill="{DynamicResource BlackBrush}" Data="F1 M 24,14C 26,14 36,33 35,34C 34,35 14,35 13,34C 12,33 22,14 24,14 Z M 24,29C 23.1716,29 22.5,29.6716 22.5,30.5C 22.5,31.3284 23.1716,32 24,32C 24.8284,32 25.5,31.3284 25.5,30.5C 25.5,29.6716 24.8284,29 24,29 Z M 22.5,20L 23,28L 25,28L 25.5,20L 22.5,20 Z " />
        </Canvas>
        <Canvas Width="48.0067" Height="48.0067" Clip="F1 M 0,0L 48.0067,0L 48.0067,48.0067L 0,48.0067L 0,0" x:Key="appbar_alien">
            <Path Width="22.005" Height="16.0048" Canvas.Left="12.9999" Canvas.Top="16.9998" Stretch="Fill" Fill="{DynamicResource BlackBrush}" Data="F1 M 16.9999,16.9998L 19.0002,16.9998L 19.0026,19.0027L 21.0002,18.9998L 21.0029,21.0029L 27.0038,21.0029L 26.9999,18.9998L 28.9999,18.9998L 28.9999,16.9998L 31.0002,16.9998L 31.0002,19.0001L 29.0002,19.0001L 29.0041,21.0029L 31.0043,21.0029L 31.0043,23.0032L 33.0046,23.0032L 33.0046,25.0035L 31.0043,25.0035L 31.0001,31.0001L 29.0001,31.0001L 29.0001,33.0001L 25.0035,33.0046L 25.0035,31.0043L 28.9999,30.9999L 29.004,28.0039L 19.0026,28.0039L 19.0026,31.0043L 17.0024,31.0043L 16.9999,25.0001L 15.0002,25.0001L 15.0002,29.0001L 12.9999,29.0001L 12.9999,24.9998L 14.9999,24.9998L 14.9999,22.9998L 16.9999,22.9998L 17.0024,21.0029L 19.0026,21.0029L 18.9999,19.0001L 16.9999,19.0001L 16.9999,16.9998 Z M 33.0046,25.0035L 35.0049,25.0035L 35.0049,29.0041L 33.0046,29.0041L 33.0046,25.0035 Z M 19.0026,31.0043L 23.0032,31.0043L 23.0032,33.0046L 19.0026,33.0046L 19.0026,31.0043 Z M 19.0026,23.0032L 19.0026,25.0035L 21.0029,25.0035L 21.0029,23.0032L 19.0026,23.0032 Z M 27.0038,23.0032L 27.0038,25.0035L 29.004,25.0035L 29.004,23.0032L 27.0038,23.0032 Z " />
   <!-- etc -->
        </Canvas>
    </ResourceDictionary>
4

1 回答 1

4

例如使用矩形控件(示例取自此处):

<Rectangle>
    <Rectangle.Fill>
        <VisualBrush Visual="{StaticResource appbar_add}" />
    </Rectangle.Fill>
</Rectangle>
于 2012-11-14T10:01:56.100 回答