ValueBar.xaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <UserControl x:Class="SummaryModule.Controls.ValueBar"
  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:SummaryModule.Controls"
  7. mc:Ignorable="d"
  8. x:Name="This"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ResourceDictionary >
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
  14. </ResourceDictionary.MergedDictionaries>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Border >
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto"/>
  21. <RowDefinition Height="4"/>
  22. <RowDefinition/>
  23. </Grid.RowDefinitions>
  24. <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" >
  25. <Run>-</Run>
  26. <Run Text="{Binding ElementName=This, Path=MaxValue, StringFormat=0.0}"></Run>
  27. </TextBlock>
  28. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Value, StringFormat=0;0}"/>
  29. <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=MaxValue, StringFormat=0.0}"/>
  30. <Grid Grid.Row="2">
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition/>
  33. <ColumnDefinition/>
  34. </Grid.ColumnDefinitions>
  35. <ProgressBar x:Name="neg" Grid.Column="0" Grid.Row="2" BorderThickness="0" Background="White" Foreground="{StaticResource LightThemeColor}" Maximum="{Binding ElementName=This, Path=MaxValue}" FlowDirection="RightToLeft"/>
  36. <ProgressBar x:Name="pos" Grid.Column="2" Grid.Row="2" BorderThickness="0" Background="White" Foreground="{StaticResource LightThemeColor}" Maximum="{Binding ElementName=This, Path=MaxValue}"/>
  37. </Grid>
  38. </Grid>
  39. </Border>
  40. </UserControl>