ComparisonTag.xaml 1.8 KB

1234567891011121314151617181920212223242526
  1. <UserControl x:Class="NEIntelligentControl2.Views.Windturbine.ComparisonTag"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Views.Windturbine"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <Grid>
  10. <ProgressBar Maximum="1" Value="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=Info.Progress}" Foreground="#FF37D253" BorderBrush="{x:Null}" Background="{x:Null}">
  11. <ProgressBar.Style>
  12. <Style TargetType="ProgressBar">
  13. <Style.Triggers>
  14. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor},Path=Info.IsShowProgress}" Value="True">
  15. <Setter Property="Visibility" Value="Visible"/>
  16. </DataTrigger>
  17. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor},Path=Info.IsShowProgress}" Value="False">
  18. <Setter Property="Visibility" Value="Collapsed"/>
  19. </DataTrigger>
  20. </Style.Triggers>
  21. </Style>
  22. </ProgressBar.Style>
  23. </ProgressBar>
  24. <TextBlock x:Name="_TBMain" Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}, Path=Info.Value}" HorizontalAlignment="Right" FontSize="14"/>
  25. </Grid>
  26. </UserControl>