XMLNS: x="http://schemas.microsoft.com/winfx/2006/xaml"
XMLNS: d="http://schemas.microsoft.com/expression/blend/2008"
XMLNS: MC="http://schemas.openxmlformats.org/markup-compatibility/2006"
XMLNS: local="CLR namespace: WPF_125P"
MC: Ignorable="d"
Title="Date Converter" Height="266" Width="300" & gt;
C # key code:
Private void buttonLoad_Click (object sender, RoutedEventArgs e)
{
List
{
New Plane () {category=category. Fighter, Name="b-1", state=state. The Unknown},
New Plane () {category=category. 'bomber, Name="B - 2", the state=state. The Unknown},
New Plane () {category=category. Fighter, Name="F - 22", state=state. The Unknown},
New Plane () {category=category. Fighter, Name="Su - 47," state=state. The Unknown},
New Plane () {category=category. 'bomber, Name="B - 52", the state=state. The Unknown},
New Plane () {category=category. Fighter, Name="J - 10", the state=state. The Unknown},
};
Enclosing listBoxPlane. ItemsSource=planes;
}
CodePudding user response:
Shows the line didn't show much are you sure you don't consider your UI problem? You this listbox the height of the height of an item is 160, 160 (80 + 80) two textblockCodePudding user response:
To this:CodePudding user response: