我在ResourceDictionary中有一个资源:
<Viewbox x:Key="Icons.Profile">
<Canvas Width="76" Height="76" Clip="F1 M 0,0L 76,0L 76,76L 0,76L 0,0">
<Path Width="40.7907" Height="33.55" Canvas.Left="16.2093" Canvas.Top="22.2" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M ... "/>
</Canvas>
</Viewbox>
Run Code Online (Sandbox Code Playgroud)
如果我添加两个引用StaticResource的Buttons/Content Controls,那么最后呈现的那个似乎呈现出"Icon"
<Button Content="{StaticResource Icons.Profile}" />
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么以及如何解决这个问题?在Visual Studio和Blend中,正在为所有控件呈现内容.
wpf ×1