8,737
社区成员
发帖
与我相关
我的任务
分享
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<Grid >
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="{Binding Extension}" Stretch="Fill" Width="40" Height="40"/>
<TextBox Name="tbx_Show" IsReadOnly="True" BorderThickness="0" Grid.Row="1" Width="60" Text="{Binding FileName}" TextAlignment="Center"
TextWrapping="Wrap" Height="35" ></TextBox>
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
private void lb_Main_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
try
{
//这个是获取绑定的数据的。..
object b = this.lb_Main.SelectedItem;
}
catch (Exception ex)
{
}
}