在两个列表视图中同时选择项目

发布于 2024-10-06 07:46:21 字数 94 浏览 0 评论 0原文

我的页面上有两个列表视图。我在第一个中选择“项目”,然后在第二个中选择“项目”。这 我在第一个中选择的项目被取消选择。

如何在两个列表视图中都选择一个项目?

I have two listViews on the page. I select Item in the first one and then in the second. The
item that I've selected in the first getting Unselected.

How can I get to have in both of the listviews a selected item ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

知你几分 2024-10-13 07:46:21

只需覆盖 ControlBrush 即可设置非活动突出显示颜色。

 <Style TargetType="ListViewItem">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{x:Static SystemColors.HighlightColor}"/>
            </Style.Resources>
        </Style>

Just override the ControlBrush to set the inactive highlight color.

 <Style TargetType="ListViewItem">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{x:Static SystemColors.HighlightColor}"/>
            </Style.Resources>
        </Style>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文