相关疑难解决方法(0)

How to add canvas xaml resource in usercontrol

I have downloaded this pack : http://modernuiicons.com/ and I'm trying to use the xaml icons.

I have added a xaml file to my solution with the following content

<?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_check" Width="76" Height="76" Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
<Path Width="37.9998" Height="31.6665" Canvas.Left="19.0001" Canvas.Top="22.1668" Stretch="Fill" Fill="#FF000000" Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z "/>
</Canvas>
Run Code Online (Sandbox Code Playgroud)

Now, how do I reference this canvas to my usercontrol?

Usercontrol

<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml

8
推荐指数
1
解决办法
8147
查看次数

标签 统计

c# ×1

wpf ×1

xaml ×1