Вот мой XAML, я вижу границу вокруг сетки и не знаю, как ее удалить.
<Border
BorderBrush = "#971c1c"
BorderThickness = "5"
CornerRadius = "5">
<Grid Background = "#971c1c">
<Grid.ColumnDefinitions>
<ColumnDefinition Width = "Auto" />
<ColumnDefinition />
<ColumnDefinition Width = "Auto" />
</Grid.ColumnDefinitions>
<Image
Width = "20"
Height = "20"
Margin = "3"
HorizontalAlignment = "Center"
VerticalAlignment = "Center"
Source = "/DataSuite.Administration.Console.WinClient;component/Resources/Integration_Error.png" />
<ItemsControl
Grid.Column = "1"
Margin = "0,5"
BorderThickness = "0"
FontSize = "14"
Foreground = "White">
<ListBoxItem>
<TextBlock Text = "This is sample text for the error. Width will be set as per the value of message" />
</ListBoxItem>
<ListBoxItem>
<TextBlock Text = "This is sample text for the error." />
</ListBoxItem>
<ListBoxItem>
<TextBlock Text = "This is sample text for the error." />
</ListBoxItem>
</ItemsControl>
<Button
Grid.Column = "2"
VerticalAlignment = "Center"
Background = "Transparent"
BorderThickness = "0"
Foreground = "White">
Dissmiss
<Button.Style>
<Style>
<Style.Triggers>
<Trigger Property = "Control.IsMouseOver" Value = "True">
<Setter Property = "Control.Cursor" Value = "Hand" />
<Setter Property = "Control.Background" Value = "Transparent" />
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</Grid>
</Border>
Я удалил границу из Itemscontrol, а также этот xaml является частью usercontrol, и я также установил Borderthickness of usercontrol на 0
Вот результат, который я вижу.





Самый простой способ сделать это - установить маржу сетки равной -1.
<Grid Background = "#971c1c" Margin = "-1">
Хе-хе ... я уже шесть лет назад ... я тебя тоже не знал!
Попробуйте вместо сетки установить фон границы.
<Border
Background = "#971c1c"
BorderThickness = "0"
CornerRadius = "5">
<Grid>
</Grid>
</Border>
хм .. товарищ wpf-разработчик из Нагарро .. :) Приятно видеть ваш комментарий. Я был в Нагарро 5 лет и не знал тебя.