Hi all,
How can I change the color of Scrollbar when i update my theme of chart ?
<UserControl x:Class=”BeanGUI.SensorGraph2D”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″
xmlns:s=”http://schemas.abtsoftware.co.uk/scichart”
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:SciChart="http://schemas.abtsoftware.co.uk/scichart"
mc:Ignorable="d"
Loaded="sciChartSurface_Loaded"
d:DesignHeight="300" d:DesignWidth="826">
<UserControl.Resources>
<Setter.Value>
</Setter.Value>
<Setter.Value>
</Setter.Value>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Define the SciChartSurface -->
<SciChart:SciChartSurface Grid.Row="2" x:Name="sciChartSurface" Padding="10,10,80,10" SciChart:ThemeManager.Theme="Oscilloscope" MouseUp="sciChartSurface_MouseUp" GotMouseCapture="sciChartSurface_GotMouseCapture" MouseDown="sciChartSurface_MouseDown">
<!-- Create three RenderableSeries, which map 1:1 to the DataSeries created in code-behind -->
<SciChart:SciChartSurface.RenderableSeries>
<SciChart:FastLineRenderableSeries x:Name="lineSeries" SeriesColor="#FFFFA500"/>
<SciChart:FastLineRenderableSeries x:Name="redLine" SeriesColor="#FFFF1919"/>
</SciChart:SciChartSurface.RenderableSeries>
<!-- Create an X Axis -->
<SciChart:SciChartSurface.XAxis>
<SciChart:DateTimeAxis x:Name="XAxis" AutoRange="Never" TextFormatting="HH:mm MMM dd" SubDayTextFormatting="HH:mm:ss MMM dd">
<SciChart:DateTimeAxis.Scrollbar>
<s:SciChartScrollbar Height="16"/>
</SciChart:DateTimeAxis.Scrollbar>
</SciChart:DateTimeAxis>
</SciChart:SciChartSurface.XAxis>
<!-- Create a Y Axis -->
<SciChart:SciChartSurface.YAxis>
<SciChart:NumericAxis Name="YAxis" AutoRange="Never" DrawMinorTicks="True" DrawMinorGridLines="true" DrawLabels ="true" DrawMajorGridLines="true" TextFormatting="0.0000" >
<SciChart:NumericAxis.GrowBy>
<SciChart:DoubleRange Min="0.1" Max="0.1"/>
</SciChart:NumericAxis.GrowBy>
<SciChart:NumericAxis.Scrollbar>
<s:SciChartScrollbar Width="16"/>
</SciChart:NumericAxis.Scrollbar>
</SciChart:NumericAxis>
</SciChart:SciChartSurface.YAxis>
<!-- Add some modifiers to zoom, zoom extents -->
<SciChart:SciChartSurface.ChartModifier>
<SciChart:ModifierGroup>
<SciChart:XAxisDragModifier></SciChart:XAxisDragModifier>
<SciChart:YAxisDragModifier AxisId="SecondaryAxisId"></SciChart:YAxisDragModifier>
<SciChart:YAxisDragModifier AxisId="PrimaryAxisId"></SciChart:YAxisDragModifier>
<SciChart:LegendModifier ShowLegend="false" ShowVisibilityCheckboxes="False" Margin="3"/>
<SciChart:RubberBandXyZoomModifier/>
<SciChart:ZoomPanModifier ExecuteOn="MouseRightButton"/>
<SciChart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
<SciChart:CursorModifier ReceiveHandledEvents="True" ShowAxisLabels="True" ShowTooltip="True" ShowTooltipOn="MouseRightButtonDown"/>
<!-- For the circle Marks -->
<!-- -->
</SciChart:ModifierGroup>
</SciChart:SciChartSurface.ChartModifier>
</SciChart:SciChartSurface>
<!-- Define the Toolbar -->
<StackPanel Grid.Row="0" Margin="2,4" HorizontalAlignment="Left" Orientation="Horizontal">
<Label x:Name="measureLabel1" Margin="5" Foreground="Green" FontStyle="Normal" FontSize="15" FontStretch="UltraCondensed"/>
<Label x:Name="unit" Margin="2" Foreground="Green" FontStyle="Normal" FontSize="10" FontStretch="UltraCondensed"/>
</StackPanel>
<!-- Define the Toolbar verticale -->
<StackPanel Grid.Row="1" HorizontalAlignment="Right" Orientation="Vertical" Width="80">
<StackPanel.Background>
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="#FFCDFFDC" Offset="1" />
</LinearGradientBrush>
</StackPanel.Background>
<!-- Update Theme of my chart -->
<GroupBox Header="Theme" Height="86" Name="groupBox2" Width="68" BorderBrush="#FFE2E226" FontSize="11" ForceCursor="False">
<!-- -->
<Grid Height="62" Width="66">
<Grid.RowDefinitions>
<RowDefinition Height="35*" />
<RowDefinition Height="29*" />
</Grid.RowDefinitions>
<ComboBox x:Name="cboTheme" MinWidth="50" Margin="2,16,12,26" SelectionChanged="cboThemeChanged" Grid.RowSpan="2" />
</Grid>
<GroupBox.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="#FF449D92" Offset="1" />
</LinearGradientBrush>
</GroupBox.Foreground>
</GroupBox>
<!-- -->
<GroupBox Header="Symboles" Height="95" Name="groupBox1" Width="70" BorderBrush="#FFE2E226">
<GroupBox.Foreground>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="#FFFFFF31" Offset="1" />
<GradientStop Color="#FFF1F12E" Offset="0.948" />
<GradientStop Color="#FF09D1DD" Offset="0.919" />
<GradientStop Color="#FF07AEB8" Offset="0.767" />
<GradientStop Color="#FFC0EA52" Offset="0.942" />
<GradientStop Color="#FFF3F32E" Offset="0.959" />
<GradientStop Color="#FFC0EA52" Offset="0.942" />
<GradientStop Color="#FFF8F82F" Offset="0.977" />
<GradientStop Color="#FF60DC9A" Offset="0.93" />
<GradientStop Color="#FF116C6C" Offset="0.878" />
</LinearGradientBrush>
</GroupBox.Foreground>
<Grid Height="39" Width="51">
<RadioButton x:Name="rdioBtCircle" Content="Circle" BorderThickness="4" Margin="-4,-8,-20,0" Foreground="White" FontSize="10" FontStretch="UltraCondensed" Checked="rdioBtCircle_Checked" Height="36" VerticalAlignment="Top"/>
<RadioButton x:Name="rdioBtCarre" Content="Square" BorderThickness="4" Margin="-4,9,-21,6" Foreground="White" FontSize="10" FontStretch="UltraCondensed" />
<RadioButton x:Name="rdioBtTriangle" Content="Triangle" BorderThickness="4" Margin="-4,6,-21,-20" Foreground="white" FontSize="10" FontStretch="UltraCondensed" Height="14" />
<RadioButton x:Name="rdioBtSans" Content="None" BorderThickness="4" Foreground="white" FontSize="10" FontStretch="UltraCondensed" Margin="-4,42,2,-15" />
</Grid>
</GroupBox>
<Button Click="CopyToClipboardClick" Content="Copy to Clipboard" Height="30" />
<Button Click="SaveAsPngClick" Content="Save to PNG" Height="30" />
<Button Margin="3" Click="PrintToXpsClick" Content="Print" Height="30" Width="75" />
</StackPanel>
<Label x:Name="graphPaneTitle" Margin="5" HorizontalAlignment="Center" Foreground="Black" FontStyle="Italic" FontSize="18" FontStretch="UltraCondensed"/>
</Grid>
Thank You!
- sahar Les asked 9 years ago
- You must login to post comments
Hi there,
Thank you for your enquiry! Please take a look at our KnowledgeBase. Here we have detailed articles on how to use the parts of the SciChart API.
In particular, take a look at
- SciChartScrollbar – per axis ScrollBars API
- Creating a Custom SciChartOverview with many series using the ScrollBar API
As these show you how to style the scrollbar.
Thanks and regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
those are the two picture ! how can i do?
- sahar Les answered 9 years ago
- You must login to post comments
Please login first to submit.