-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
📭 waiting-author-feedbackTo request more information from author.To request more information from author.
Description
Description
The implementation here:
public class ProgressMask : ProgressBar
{
// ...
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Tests.Wpf.Controls">
<Style TargetType="{x:Type controls:ProgressMask}">
<Setter Property="IsIndeterminate" Value="True" />
<Setter Property="ProgressBarWidth" Value="280" />
<Setter Property="ProgressBarHeight" Value="10" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="1,0" EndPoint="0,1">
<GradientStop Offset="0.0" Color="#B09c9591" />
<GradientStop Offset="1.0" Color="#20a89d94" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:ProgressMask}">
<Border Background="{TemplateBinding Background}">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="{TemplateBinding Caption}" />
<ProgressBar Width="{TemplateBinding ProgressBarWidth}"
Height="{TemplateBinding ProgressBarHeight}"
IsIndeterminate="{TemplateBinding IsIndeterminate}" />
</StackPanel>
<Button Margin="5"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Background="Transparent"
Command="{TemplateBinding CancelCommand}"
Content="{TemplateBinding CancellationText}" />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Reproduction Steps
Expected behavior
The ProgressMask.xaml doesn't inherit from ProgrssBar.xaml,
so the TextBlock foreground in the ProgressMask.xaml should be normal black, not the progressbar green foreground.
Actual behavior
The TextBlock foreground in the ProgressMask.xaml is progress's green foreground.
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
📭 waiting-author-feedbackTo request more information from author.To request more information from author.