100 lines
7.1 KiB
XML
100 lines
7.1 KiB
XML
<UserControl x:Class="HandyControlDemo.UserControl.TabControlDemoCtl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Background="{DynamicResource RegionBrush}"
|
|
DataContext="{Binding TabControlDemo,Source={StaticResource Locator}}"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol">
|
|
<hc:TransitioningContentControl>
|
|
<hc:ScrollViewer HorizontalScrollBarVisibility="Auto">
|
|
<hc:Interaction.Triggers>
|
|
<hc:RoutedEventTrigger RoutedEvent="hc:TabItem.Closing">
|
|
<hc:EventToCommand Command="{Binding ClosingCmd}" PassEventArgsToCommand="True" />
|
|
</hc:RoutedEventTrigger>
|
|
<hc:RoutedEventTrigger RoutedEvent="hc:TabItem.Closed">
|
|
<hc:EventToCommand Command="{Binding ClosedCmd}" PassEventArgsToCommand="True" />
|
|
</hc:RoutedEventTrigger>
|
|
</hc:Interaction.Triggers>
|
|
<StackPanel>
|
|
<Label Style="{StaticResource LabelPrimary}" Content="Default" Margin="32,32,0,0" HorizontalAlignment="Left"/>
|
|
<hc:TabControl ShowOverflowButton="False" ShowScrollButton="True" Margin="32,16,32,0" Width="800" Height="300" IsScrollable="True">
|
|
<hc:TabItem Header="TabItem1" IsSelected="True">
|
|
<!--<hc:SimplePanel Background="White"/>-->
|
|
<hc:TransitioningContentControl>
|
|
<StackPanel Margin="32">
|
|
<Slider Value="50" Name="SliderDemo" Maximum="100"/>
|
|
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="30" Margin="16,0,0,0"/>
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="20" Height="20" ArcThickness="2" Style="{StaticResource ProgressBarSuccessCircle}"/>
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="30" Height="30" ArcThickness="6" Style="{StaticResource ProgressBarInfoCircle}"/>
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="40" Height="40" ArcThickness="10" Style="{StaticResource ProgressBarWarningCircle}"/>
|
|
<hc:CircleProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" Width="50" Height="50" Style="{StaticResource ProgressBarDangerCircle}"/>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
|
|
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
|
|
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="20" Margin="16,0,0,0" WaveThickness="4" WaveStroke="#FFFF0080">
|
|
<hc:WaveProgressBar.WaveFill>
|
|
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#66FF0080" Offset="0"/>
|
|
<GradientStop Color="#FFFF0080" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</hc:WaveProgressBar.WaveFill>
|
|
</hc:WaveProgressBar>
|
|
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="50" Height="50" Style="{StaticResource ProgressBarWarningWave}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</hc:TransitioningContentControl>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem2">
|
|
<hc:SimplePanel Background="{DynamicResource DarkDangerBrush}"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem3">
|
|
<hc:SimplePanel Background="{DynamicResource PrimaryBrush}"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem4">
|
|
<hc:SimplePanel Background="{DynamicResource DarkInfoBrush}"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem5">
|
|
<hc:SimplePanel Background="{DynamicResource DarkSuccessBrush}"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem6">
|
|
<hc:SimplePanel Background="{DynamicResource DarkWarningBrush}"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem7">
|
|
<hc:SimplePanel Background="{DynamicResource DarkAccentBrush}"/>
|
|
</hc:TabItem>
|
|
</hc:TabControl>
|
|
<StackPanel Orientation="Horizontal" Margin="32,32,32,16">
|
|
<Label Style="{StaticResource LabelPrimary}" Margin="0" Content="IsEnableTabFill = True"/>
|
|
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="ShowCloseButton = True"/>
|
|
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsDraggable = True"/>
|
|
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsEnableAnimation = True"/>
|
|
</StackPanel>
|
|
<hc:TabControl IsEnableAnimation="True" ShowCloseButton="True" IsDraggable="True" IsEnableTabFill="True" Margin="32,0,32,32" Width="800" Height="300">
|
|
<hc:TabItem Header="TabItem1">
|
|
<hc:SimplePanel Background="White"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem IsSelected="True" Header="TabItem2">
|
|
<hc:SimplePanel Background="#FFE8563F"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem3">
|
|
<hc:SimplePanel Background="#FF3F4EE8"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem4">
|
|
<hc:SimplePanel Background="#FFE83F6D"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem5">
|
|
<hc:SimplePanel Background="#FFB23FE8"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem6">
|
|
<hc:SimplePanel Background="#FF3FE8E8"/>
|
|
</hc:TabItem>
|
|
<hc:TabItem Header="TabItem7">
|
|
<hc:SimplePanel Background="#FFE8E03F"/>
|
|
</hc:TabItem>
|
|
</hc:TabControl>
|
|
</StackPanel>
|
|
</hc:ScrollViewer>
|
|
</hc:TransitioningContentControl>
|
|
</UserControl>
|