总是忘记语法,复制下来记录一下。
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)" Storyboard.TargetName="grid">
<TextBox Grid.Column="1" Text="{Binding Path=(ListBox.SelectedValue).(DoMain:GroupModel.RowID),ElementName=mylistbox}"
IsReadOnly="True" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<ListBox x:Name="mylistbox" Grid.Row="2" Grid.ColumnSpan="2" SelectionMode="Single" IsSynchronizedWithCurrentItem="True"
ItemsSource="{Binding}">
<ListBox.Template>
<ControlTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" >
<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>
</ScrollViewer>
</ControlTemplate>
</ListBox.Template>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<EventSetter Event="ListBoxItem.PreviewMouseDoubleClick"
Handler="ListBoxItemDoubleClick" />
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type DoMain:GroupModel}">
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Image Source="{Binding Ico,Mode=OneWay,Converter={StaticResource imageConverter}}"/>
<Label Grid.Row="1" Content="{Binding GroupName}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>