<Window.Resources> <DataTemplate x:Key="BarChartItemsTemplate"> <Border Width="385" Height="50"> <Grid> <Rectangle Name="rectangleBarChart" Fill="MediumOrchid" StrokeThickness="2" Height="40" Width="{Binding}" HorizontalAlignment="Right" VerticalAlignment="Bottom"> <Rectangle.LayoutTransform> <ScaleTransform ScaleX="4"/> </Rectangle.LayoutTransform> </Rectangle> <TextBlock Margin="14" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Text="{Binding}"> <TextBlock.LayoutTransform> <TransformGroup> <RotateTransform Angle="90"/> <ScaleTransform ScaleX="-1" ScaleY="1"/> </TransformGroup> </TextBlock.LayoutTransform> </TextBlock> </Grid> </Border> </DataTemplate> </Window.Resources>
<ListBox Name="barChartListBox" ItemsSource="{Binding}" BorderThickness="0" ItemTemplate="{DynamicResource BarChartItemsTemplate}" ItemsPanel="{DynamicResource BarChartItemsPanel}" Margin="36,-3,48,12"></ListBox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)