Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ItemsControl ItemsSource="{Binding DisplayViewModels}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <ToggleButton Grid.ColumnSpan="2" Height="30" Template="{StaticResource HeaderTemplate}" IsChecked="{Binding IsChecked, Mode=TwoWay}"
- FocusVisualStyle="{StaticResource ResourceKey=FVS_None}">
- <ToggleButton.Content>
- <StackPanel Orientation="Horizontal">
- <TextBlock FontFamily="Arial" FontWeight="Bold" FontSize="14" Margin="10,0,0,0"
- Foreground="{StaticResource ResourceKey=SectionForeground}" Text="{Binding DisplayText}"/>
- <Button Margin="10,0,0,0" Content="X" Width="20" Height="20" Style="{StaticResource ResourceKey=Button}"
- Command="{StaticResource ResourceKey=CloseOrder}" CommandParameter="{Binding}"/>
- </StackPanel>
- </ToggleButton.Content>
- <ToggleButton.ContextMenu>
- <ContextMenu><MenuItem Command="{StaticResource ResourceKey=CloseOrder}"
- CommandParameter="{Binding Path=PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
- Header="Close Order"/></ContextMenu>
- </ToggleButton.ContextMenu>
- </ToggleButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement