WPF 名称/图像未显示在设计视图中

问题描述 投票:0回答:1

我正在开发一个 Visual Studio 扩展,使用

CrispImage
UIElement 和标记功能,如here所示。然而,尽管在运行时显示,但它们在设计时并不显示。还在测试新项目中对此进行了测试 - 同样的问题。 xaml 的示例(删除任何样式):

<ToolBarTray x:Name="TopToolbar" DockPanel.Dock="Left" Background="Transparent">
    <ToolBar >
        <Button ToolTip="Refresh" Command="{Binding RefreshCommand}">
            <imaging:CrispImage Width="16" Height="16" Moniker="{x:Static catalog:KnownMonikers.Refresh}" />
        </Button>

我在设计师中得到的:

在运行时:

GitHub 代码在这里

wpf xaml toolbar visual-studio-extensions moniker
1个回答
0
投票

目前看来无法实现你想要的:

VSSDK/CPS/扩展性:通过 .imagemanifest 在 VS 扩展中加载图像在 VS2022 中被破坏

扩展图像问题仍有待解决。

© www.soinside.com 2019 - 2024. All rights reserved.