如何在左侧图标的右侧添加按钮

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

我正在开发一个mahapps.metro应用程序。我当前的任务是在Icon旁边的标题栏中添加一个NavigateBack-Button。

我正在读这个帖子:https://www.devexpress.com/Support/Center/Question/Details/T576836/how-can-i-add-titlebar-left-a-button

但他们使用devexpress并没有帮助我,因为我正在使用mahapps.metro。

有人可以帮帮我吗?

c# .net wpf mahapps.metro titlebar
1个回答
0
投票

我认为你正在寻找的是MetroWindow的LeftWindowCommands部分。您可以在快速入门指南中查看它。

<Controls:MetroWindow.LeftWindowCommands>
    <Button>
        <Rectangle>
            <Rectangle.Fill>
                <VisualBrush Visual="{StaticResource appbar_arrowleft}" />
            </Rectangle.Fill>
        </Rectangle>
    </Button>
</Controls:MetroWindow.LeftWindowCommands>
© www.soinside.com 2019 - 2024. All rights reserved.