FishEye选择图像索引什么的

发布于 2024-12-22 14:59:35 字数 194 浏览 1 评论 0原文

我对 WPF 还很陌生。我遇到了这个精彩的项目。我已经计划使用它了。我用它来显示鱼眼效果,无论我想要什么,如果可以看到选择了哪个图像,如果它被单击,我就知道哪个索引或其他东西,以便我可以做一些逻辑。

可能的?

I am quite new to WPF.I came accross this wonderful project. I have planed to use it. I have used it to show the fish eye effect how ever I want that if it is possible to see which image is selected and if it gets clicked i get to know which index or something so that i can do some logic.

Possible?

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

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

发布评论

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

评论(1

去了角落 2024-12-29 14:59:35

本文介绍了自定义面板的创建。 WPF 中的面板描述了布局,但不支持选择。为了支持选择,您需要使用诸如ListBox之类的控件。幸运的是,列表框允许您指定使用哪个面板来显示内容:

<ListBox>
  <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
      <!-- the custom fish eye panel -->
      <FishEyePanel/>
    </ItemsPanelTemplate>
  </ListBox.ItemsPanel>
</ListBox>

这是否有效取决于鱼眼面板的实现。然而,这是正确的前进方向!

The article describes the creation of a custom panel. A panel in WPF describes layout but does not support selection. In order to support selection you need to use a control such as ListBox. Fortunately the ListBox allows you to specify which panel to use to fost your content:

<ListBox>
  <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
      <!-- the custom fish eye panel -->
      <FishEyePanel/>
    </ItemsPanelTemplate>
  </ListBox.ItemsPanel>
</ListBox>

Whether this works or not depends on the implementation of the fish-eye panel. However, this is the right direction to move in!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文