簡単。(これを行うための 3 つの方法を紹介しましたが、そのうちの 1 つが正しいに違いありません!)
Xaml 経由:
<ListBox x:Name="ListBoxControl" HorizontalAlignment="Left" Height="320" VerticalAlignment="Top" Width="520">
<ListBoxItem Width="520">
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled">
<Label Content="My Name is KidCode. This is a reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeaaaaaaaaaaaaaaaaaaaaaaaaly long comment."/>
</ScrollViewer>
</ListBoxItem>
</ListBox>
C# から:
namespace StackExchange
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var lbv = new ListBoxItemSV()
{
Height = 40,
Width= 520,
Background = Brushes.Blue
};
ListBoxControl.Items.Add(lbv);
}
public class ListBoxItemSV : ListBoxItem
{
ScrollViewer sv = new ScrollViewer()
{
HorizontalScrollBarVisibility = ScrollBarVisibility.Visible,
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden
};
Label lbl = new Label()
{
Content = "A really, really, really, really, really, really, really, really, really, really, really, really, really, really, really, really long name."
};
public ListBoxItemSV()
{
sv.Content = lbl;
this.Content = sv;
}
}
}
}
この結果は次のようになります: (違いがわかるように短いコメントを追加しました。おそらく、スクロール バーを最後まで移動させることができますが、これは単なる例です。)

アイテム テンプレートを使用している場合: (私はこれを行ったことがないので、間違っていても私を撃たないでください! :) )
XAML:
<ListBox x:Name="ListBoxTwo">
<ListBox.ItemTemplate>
<DataTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled" Width="520">
<Label Content="{Binding}"/>
</ScrollViewer>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
コードビハインド:
List<string> Mylist = new List<string>();
Mylist.Add("Short Name");
Mylist.Add("Another Short Name");
Mylist.Add("A massively, hugely, giganticly, monstorously large name. (Its even bigger than than you think...............) ");
ListBoxTwo.ItemsSource = Mylist;
出力:
