© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•11mo ago
damon

WPF : The ItemsControl border has extra lines appearing.

I am using ItemsControl with WrapPanel as the panel and have set a border for the ItemsControl. How can I make the border apply only to the content area? Right now, there is extra space beyond the content area.

<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" IsItemsHost="True" />
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
7c661ee690fc923edf00dbe7708598d.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Wpf Itemscontrol child access
C#CC# / help
4y ago
❔ WPF Border Button
C#CC# / help
3y ago
❔ WPF Border TemplateBinding
C#CC# / help
4y ago