上面的问题可能有点乱,所以我会在这里解释一下。
目前我Expander在我的 WPF 中使用
下面是我的代码
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}">
<StackPanel x:Name="spItemDisplay" DataContext="{Binding itemDisplayList}">
<Expander x:Name="expander1" HorizontalAlignment="Stretch" Header="{Binding ItemName}">
<StackPanel Orientation="Vertical" TextBlock.Foreground="{DynamicResource MaterialDesignBody}" Margin="24,8,24,16">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label FontWeight="Bold" Content="Item Code" Grid.Column="0" Grid.Row="0" />
<TextBlock Text="{Binding ItemCode}" Grid.Column="1" Grid.Row="0"/>
<Label FontWeight="Bold" Content="Item Name" Grid.Column="0" Grid.Row="1" />
<TextBlock Text="{Binding ItemName}" Grid.Column="1" Grid.Row="1"/>
智慧大石
相关分类