Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.28 KB | None | 0 0
  1. <TabControl x:Name="ListTabs" DockPanel.Dock="Top"
  2. Background="Transparent"
  3. Padding="0"
  4. BorderBrush="Transparent"
  5. ItemsSource="{Binding Source={StaticResource listData}}" SelectionChanged="ListTabs_SelectionChanged">
  6. <TabControl.ItemContainerStyle>
  7. <Style TargetType="{x:Type TabItem}">
  8. <Setter Property="Header" Value="{Binding title}" />
  9. <Setter Property="Content" Value="{Binding title}" />
  10. <Setter Property="Template">
  11. <Setter.Value>
  12. <ControlTemplate TargetType="TabItem">
  13. <StackPanel>
  14. <TextBlock Text="{Binding title}" Margin="5,0,5,0"
  15. Style="{DynamicResource MetroHeading1}" Foreground="{DynamicResource MetroText}"/>
  16. </StackPanel>
  17. </ControlTemplate>
  18. </Setter.Value>
  19. </Setter>
  20. </Style>
  21. </TabControl.ItemContainerStyle>
  22. <TabControl.Style>
  23. <Style TargetType="{x:Type TabControl}">
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="TabControl">
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="Auto" />
  30. <RowDefinition Height="*" />
  31. </Grid.RowDefinitions>
  32. <StackPanel Grid.Row="0" Orientation="Horizontal">
  33. <TabPanel IsItemsHost="True">
  34. </TabPanel>
  35. </StackPanel>
  36. <!--ContentPresenter ContentSource="SelectedContent" Margin="0"/-->
  37. <local:BusyDataView Grid.Row="1" x:Name="Samples1" ListID="{Binding id}" DockPanel.Dock="Top" Grid.ColumnSpan="100" Visibility="Visible" HorizontalAlignment="Stretch" />
  38. </Grid>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. </TabControl.Style>
  44. <!--<TabItem Header="Tab1" HeaderTemplate="{StaticResource titleText}" Background="Transparent">
  45. <local:ListItemView x:Name="Samples1" DockPanel.Dock="Top" Grid.ColumnSpan="100" Visibility="Visible" HorizontalAlignment="Stretch" />
  46. </TabItem>
  47. <TabItem Header="Tab2" HeaderTemplate="{StaticResource titleText}" Background="Transparent">
  48. <local:ListItemView x:Name="Samples" DockPanel.Dock="Top" Grid.ColumnSpan="100" Visibility="Visible" HorizontalAlignment="Stretch" />
  49. </TabItem>-->
  50.  
  51. </TabControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement