实例如下
<Grid Grid.Column="1" Visibility="{Binding VisibilityShortcut}"> <Grid.RowDefinitions> <RowDefinition Height="15" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <Path Stroke="Black" StrokeThickness="0" Fill="{DynamicResource UcDrugDicShortcut.Container.Background}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0"> <Path.Data> <PathGeometry Figures=" M 95,15 L 95,15 95,15 L 110,0 110,15 Z" /> </Path.Data> </Path> </Grid> <Grid Grid.Row="1"> <Border Background="{DynamicResource UcDrugDicShortcut.Container.Background}" Height="Auto" VerticalAlignment="Top" CornerRadius="12"> <WrapPanel Name="wpnlTest" Background="Transparent" Height="Auto" Margin="12"> <ItemsControl ItemsSource="{Binding Models}" ItemTemplate="{StaticResource ButtonItemTemplate}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> </WrapPanel> </Border> </Grid> </Grid>