0

1 element essentially consists of 2 pictureboxes left and right and a label/text in between. They are supposed to be an inseparable unit. (person image and their name, status color right)

I want to put several of those elements in a scrollable box.

My current solution is a bit perverted: I created 5 of my desired elements by myself and change their content on mousewheel scroll and a "fake" scroll bar consisting of a bar image with a scroll position box overlay that changes position dependent on whats displayed. This obviously is a disgusting solution I don't want to keep.

Project language is C#, it's an office addin written in VS Ultimate 2012.

It's a custom one click call solution for my company that draws it's source data directly from outlook.

4

2 回答 2

0

当我有类似的要求时,我创建了一个 UserControl 并根据需要将它们添加到 FlowLayoutPanel 中。当然,这是使用 WinForms,而 WPF 可能更适合您。

于 2013-07-22T11:12:55.893 回答
0

您可以做的是创建一个派生自 Panel 的自定义类,给它 2 个图片框和一个标签作为属性或构造函数参数,将它们添加到 Panel(this.Add(),因为类是面板),设置它们位置等并将您的自定义面板添加到可滚动框中。

于 2013-07-22T11:26:43.703 回答