|
<UserControl x:Class="StockVisualization.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:charts="clr-namespace:Visiblox.Charts;assembly=Visiblox.Charts"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<StackPanel x:Name="LayoutRoot" Orientation="Vertical">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock>Stock code:</TextBlock>
<ComboBox x:Name="ComboStockCode">
<ComboBoxItem Content="MSFT" IsSelected="True"/>
<ComboBoxItem Content="GOOG"/>
<ComboBoxItem Content="VOD"/>
<ComboBoxItem Content="BCS"/>
</ComboBox>
<Button x:Name="BtnUpdate" Content="Update" Click="BtnUpdate_Click"/>
</StackPanel>
<StackPanel Orientation="Horizontal" x:Name="PanelFetchingData" Visibility="Collapsed" Margin="0,5,0,5" HorizontalAlignment="Center">
<ProgressBar IsIndeterminate="True" Width="150" Height="15"/>
</StackPanel>
<charts:Chart x:Name="StockChart" Width="600" Height="300" LegendVisibility="Collapsed">
<charts:Chart.Series>
<!-- Add a LineSeries that shows points and displays tooltips when hovering over them -->
<charts:LineSeries ShowPoints="True" ToolTipEnabled="True">
<charts:LineSeries.DataSeries>
<!-- Set the data source of the LineSeries to be a BindableDataSeries to allow binding to our business object collection -->
<charts:BindableDataSeries XValueBinding="{Binding Date}" YValueBinding="{Binding Price}"/>
</charts:LineSeries.DataSeries>
</charts:LineSeries>
</charts:Chart.Series>
<charts:Chart.Behaviour>
<charts:BehaviourManager AllowMultipleEnabled="True">
<charts:PanBehaviour YPanEnabled="False" IsEnabled="True"/>
<charts:ZoomBehaviour IsEnabled="True"/>
</charts:BehaviourManager>
</charts:Chart.Behaviour>
</charts:Chart>
<TextBlock HorizontalAlignment="Center" Width="400" TextWrapping="Wrap" Text="Drag mouse to pan, scroll with mousewheel to zoom."/>
</StackPanel>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.