mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
[WIP] neat progressbar
This commit is contained in:
@@ -102,7 +102,13 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border x:Name="ContentBorder" Grid.Row="2" Padding="36,16,36,36">
|
|
||||||
|
|
||||||
|
<ProgressBar HorizontalAlignment="Stretch" IsIndeterminate="True"
|
||||||
|
Grid.Row="2" VerticalAlignment="Top" Height="24"
|
||||||
|
Style="{StaticResource ZPB}" Margin="8" Foreground="#88FFFFFF"/>
|
||||||
|
|
||||||
|
<Border x:Name="ContentBorder" Grid.Row="2" Padding="36,16,36,36" Visibility="Collapsed">
|
||||||
<ContentControl x:Name="ContentFrame">
|
<ContentControl x:Name="ContentFrame">
|
||||||
<ContentControl.RenderTransform>
|
<ContentControl.RenderTransform>
|
||||||
<TranslateTransform/>
|
<TranslateTransform/>
|
||||||
|
|||||||
@@ -236,4 +236,281 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!--<Style x:Key="ZuneProgressBarStyle" TargetType="ProgressBar">
|
||||||
|
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="ProgressBar" BasedOn="{StaticResource ZuneProgressBarStyle}"/>-->
|
||||||
|
<LinearGradientBrush x:Key="į"
|
||||||
|
EndPoint="0,1"
|
||||||
|
StartPoint="0,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#B2FFFFFF"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#8CFFFFFF"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="İ"
|
||||||
|
EndPoint="1,0"
|
||||||
|
StartPoint="0,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#E9570C"
|
||||||
|
Offset="0"/>
|
||||||
|
<!--<GradientStop Color="#C7C7C7"
|
||||||
|
Offset="0.5"/>-->
|
||||||
|
<GradientStop Color="#F10EA1"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="ı"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="0,1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#80FFFFFF"
|
||||||
|
Offset="0.05"/>
|
||||||
|
<GradientStop Color="#00FFFFFF"
|
||||||
|
Offset="0.25"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="IJ"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="0,1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#50FFFFFF"
|
||||||
|
Offset="0.5385"/>
|
||||||
|
<GradientStop Color="#00FFFFFF"
|
||||||
|
Offset="0.5385"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="ij"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="0,1">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#90FFFFFF"
|
||||||
|
Offset="0.5385"/>
|
||||||
|
<GradientStop Color="#00FFFFFF"
|
||||||
|
Offset="0.5385"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<RadialGradientBrush x:Key="Ĵ"
|
||||||
|
RadiusX="1"
|
||||||
|
RadiusY="1"
|
||||||
|
RelativeTransform="1,0,0,1,0.5,0.5">
|
||||||
|
<RadialGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#60FFFFC4"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#00FFFFC4"
|
||||||
|
Offset="1"/>
|
||||||
|
</RadialGradientBrush.GradientStops>
|
||||||
|
</RadialGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="ĵ"
|
||||||
|
StartPoint="0,1"
|
||||||
|
EndPoint="0,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#60FFFFC4"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#00FFFFC4"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<RadialGradientBrush x:Key="Ķ"
|
||||||
|
RadiusX="1"
|
||||||
|
RadiusY="1"
|
||||||
|
RelativeTransform="1,0,0,1,-0.5,0.5">
|
||||||
|
<RadialGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#60FFFFC4"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#00FFFFC4"
|
||||||
|
Offset="1"/>
|
||||||
|
</RadialGradientBrush.GradientStops>
|
||||||
|
</RadialGradientBrush>
|
||||||
|
|
||||||
|
<LinearGradientBrush x:Key="ķ"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="1,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#0C000000"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#20000000"
|
||||||
|
Offset="0.3"/>
|
||||||
|
<GradientStop Color="#00000000"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
<LinearGradientBrush x:Key="ĸ"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="1,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#00000000"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#20000000"
|
||||||
|
Offset="0.7"/>
|
||||||
|
<GradientStop Color="#0C000000"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<LinearGradientBrush x:Key="Ĺ"
|
||||||
|
StartPoint="0,0"
|
||||||
|
EndPoint="1,0">
|
||||||
|
<LinearGradientBrush.GradientStops>
|
||||||
|
<GradientStop Color="#00FFFFFF"
|
||||||
|
Offset="0"/>
|
||||||
|
<GradientStop Color="#60FFFFFF"
|
||||||
|
Offset="0.4"/>
|
||||||
|
<GradientStop Color="#60FFFFFF"
|
||||||
|
Offset="0.6"/>
|
||||||
|
<GradientStop Color="#00FFFFFF"
|
||||||
|
Offset="1"/>
|
||||||
|
</LinearGradientBrush.GradientStops>
|
||||||
|
</LinearGradientBrush>
|
||||||
|
|
||||||
|
<Style x:Key="ZPB"
|
||||||
|
TargetType="{x:Type ProgressBar}">
|
||||||
|
<Setter Property="Foreground"
|
||||||
|
Value="#01D328"/>
|
||||||
|
<Setter Property="Background"
|
||||||
|
Value="{StaticResource İ}"/>
|
||||||
|
<Setter Property="BorderBrush"
|
||||||
|
Value="{StaticResource į}"/>
|
||||||
|
<Setter Property="BorderThickness"
|
||||||
|
Value="1"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ProgressBar}">
|
||||||
|
<Grid Name="TemplateRoot"
|
||||||
|
SnapsToDevicePixels="true">
|
||||||
|
<!--Background -->
|
||||||
|
<Rectangle Fill="{TemplateBinding Background}"
|
||||||
|
RadiusX="2"
|
||||||
|
RadiusY="2"/>
|
||||||
|
<!--Glassy Highlight -->
|
||||||
|
<Border Background="{StaticResource IJ}"
|
||||||
|
Margin="1"
|
||||||
|
CornerRadius="2"/>
|
||||||
|
<!--Edges and Top Highlight -->
|
||||||
|
<Border BorderBrush="#80FFFFFF"
|
||||||
|
Background="{StaticResource ı}"
|
||||||
|
BorderThickness="1,0,1,1"
|
||||||
|
Margin="1"/>
|
||||||
|
<Rectangle Name="PART_Track"
|
||||||
|
Margin="1"/>
|
||||||
|
|
||||||
|
<!--Indicator -->
|
||||||
|
<Decorator x:Name="PART_Indicator"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Margin="1">
|
||||||
|
<Grid Name="Foreground">
|
||||||
|
<!-- Indicator Background -->
|
||||||
|
<Rectangle x:Name="Indicator"
|
||||||
|
Fill="{TemplateBinding Foreground}"/>
|
||||||
|
<!-- Animated Background -->
|
||||||
|
<Grid x:Name="Animation" ClipToBounds="true">
|
||||||
|
<!-- Animated White glow -->
|
||||||
|
<Rectangle x:Name="PART_GlowRect" Width="100"
|
||||||
|
Fill="{StaticResource Ĺ}"
|
||||||
|
Margin="-100,0,0,0"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
</Rectangle>
|
||||||
|
</Grid>
|
||||||
|
<Grid x:Name="Overlay">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition MaxWidth="15"/>
|
||||||
|
<ColumnDefinition Width="0.1*"/>
|
||||||
|
<ColumnDefinition MaxWidth="15"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<!--Dark Edges -->
|
||||||
|
<Rectangle x:Name="LeftDark"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Fill="{StaticResource ķ}"
|
||||||
|
RadiusX="1"
|
||||||
|
RadiusY="1"
|
||||||
|
Margin="1,1,0,1"/>
|
||||||
|
<Rectangle x:Name="RightDark"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
RadiusX="1"
|
||||||
|
RadiusY="1"
|
||||||
|
Fill="{StaticResource ĸ}"
|
||||||
|
Margin="0,1,1,1"/>
|
||||||
|
<!--Lighting Effect -->
|
||||||
|
<Rectangle x:Name="LeftLight"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Fill="{StaticResource Ĵ}"/>
|
||||||
|
<Rectangle x:Name="CenterLight"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="2"
|
||||||
|
Fill="{StaticResource ĵ}"/>
|
||||||
|
<Rectangle x:Name="RightLight"
|
||||||
|
Grid.Column="2"
|
||||||
|
Grid.Row="2"
|
||||||
|
Fill="{StaticResource Ķ}"/>
|
||||||
|
<!--Glassy Highlight -->
|
||||||
|
<Border x:Name="Highlight1"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Background="{StaticResource ij}"/>
|
||||||
|
<Border x:Name="Highlight2"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Background="{StaticResource ı}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Decorator>
|
||||||
|
|
||||||
|
<Border BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
CornerRadius="2"/>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="Orientation"
|
||||||
|
Value="Vertical">
|
||||||
|
<Setter TargetName="TemplateRoot"
|
||||||
|
Property="LayoutTransform">
|
||||||
|
<Setter.Value>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="IsIndeterminate"
|
||||||
|
Value="true">
|
||||||
|
<!-- Hide the indicator and just use the AnimatedBackground -->
|
||||||
|
<Setter TargetName="LeftDark"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
<Setter TargetName="RightDark"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
<Setter TargetName="LeftLight"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
<Setter TargetName="CenterLight"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
<Setter TargetName="RightLight"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
<Setter TargetName="Indicator"
|
||||||
|
Property="Visibility"
|
||||||
|
Value="Collapsed"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsIndeterminate"
|
||||||
|
Value="false">
|
||||||
|
<Setter TargetName="Animation"
|
||||||
|
Property="Background"
|
||||||
|
Value="#80B5FFA9"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user