Advertisement
Guest User

piechart.xaml

a guest
Dec 22nd, 2010
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. <UserControl x:Class="SpendAnalyzer.PieChartPanel"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:app="clr-namespace:SpendAnalyzer"
  5. xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
  6. xmlns:datavis="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
  7. xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
  8. xmlns:System_Windows_Controls_DataVisualization_Charting_Primitives="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit"
  9. xmlns:theming="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.Toolkit"
  10. xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
  11. Width="Auto"
  12. Height="Auto">
  13. <UserControl.Resources>
  14. <app:USDollarAmountValueConverter x:Key="USDollarAmountValueConverter" />
  15. <app:AdditionalIconVisibilityConverter x:Key="AdditionalIconVisibilityConverter" />
  16. <SolidColorBrush Color="#FF576166" x:Key="GrayColor" />
  17. <app:BudgetDiffExpenseConverter x:Key="BudgetDiffExpenseConverter" />
  18. <app:BudgetDiffExpenseColorConverter x:Key="BudgetDiffExpenseColorConverter" />
  19. <app:AmountValueConverter x:Key="AmountValueConverter" />
  20. <app:BudgetValueConverter x:Key="BudgetValueConverter"></app:BudgetValueConverter>
  21. <app:VarianceValueConverter x:Key="VarianceValueConverter"></app:VarianceValueConverter>
  22. <app:NonZeroBudgetDiffExpenseConverter x:Key="NonZeroBudgetDiffExpenseConverter"></app:NonZeroBudgetDiffExpenseConverter>
  23.  
  24.  
  25.  
  26. <!-- LegendItemStyle1 -->
  27. <Style x:Key="LegendItemStyle1" TargetType="chartingToolkit:LegendItem">
  28. <Setter Property="IsTabStop" Value="False" />
  29. <Setter Property="Template">
  30. <Setter.Value>
  31. <ControlTemplate TargetType="chartingToolkit:LegendItem">
  32. <Grid Margin="0, 6">
  33. <Line Stroke="Gray"
  34. StrokeDashArray="1.0, 2.0"
  35. X1="500"
  36. Stretch="None"
  37. StrokeThickness="1"
  38. VerticalAlignment="Bottom" />
  39. <toolkit:DockPanel>
  40. <StackPanel Orientation="Horizontal" Background="White">
  41. <Rectangle Width="10"
  42. Height="10"
  43. Fill="{Binding DataContext.Background}"
  44. Margin="0, 0, 6, 0"/>
  45. <Image Source="/Resources/additional.png"
  46. Stretch="none"
  47. VerticalAlignment="Center"
  48. Margin="-2, 0, 2, 0"
  49. Visibility="{Binding DataContext.Text, Converter={StaticResource AdditionalIconVisibilityConverter}}"/>
  50. <HyperlinkButton Foreground="#FF3283B6"
  51. FontSize="12"
  52. VerticalAlignment="Bottom"
  53. Content="{TemplateBinding Content}">
  54. </HyperlinkButton>
  55. </StackPanel>
  56. <Border Background="White"
  57. VerticalAlignment="Bottom"
  58. HorizontalAlignment="Right" >
  59. <TextBlock FontSize="12" Text="$ 12,123" />
  60. </Border>
  61. </toolkit:DockPanel>
  62. </Grid>
  63. </ControlTemplate>
  64. </Setter.Value>
  65. </Setter>
  66. </Style>
  67.  
  68. <ControlTemplate x:Key="GrowPieDataPoint" TargetType="chartingToolkit:PieDataPoint">
  69. <Path Data="{TemplateBinding Geometry}"
  70. Fill="{TemplateBinding Background}"
  71. Stroke="{TemplateBinding BorderBrush}"
  72. StrokeThickness="0"
  73. MouseEnter="Path_MouseEnter"
  74. MouseLeave="Path_MouseLeave"
  75. MouseLeftButtonUp="Path_MouseLeftButtonUp"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement