Hi All,
I have a problem about the length of my Scrollbar this is my code :
<!-- The grid is used to set paddings around the Overview, so that the size of the Overview matches the size of the XAxis on the parent chart -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1020"/>
<!-- Matches parent surface padding left -->
<ColumnDefinition Width="*"/>
<!-- Hosts overview control -->
<ColumnDefinition Width="{Binding ActualWidthValue, ElementName=proxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
<!-- Used to bind to parent surface YAxis -->
<ColumnDefinition Width="50"/>
<!-- Matches parent surface padding right -->
</Grid.ColumnDefinitions>
<helpers:ActualSizePropertyProxy x:Name="proxy" Element="{Binding ElementName=sciChartSurface, Path=YAxis}"/>
<SciChart:SciChartOverview ParentSurface="{Binding ElementName=sciChartSurface,
Mode=OneWay}"
SciChart:ThemeManager.Theme="{Binding ElementName=cboTheme,
Path=SelectedItem}"
SelectedRange="{Binding XVisibleRange,
Mode=TwoWay}" Focusable="True" />
but when i increase the Width the Scrollbar doesn’t change !! (like the picture)
So, i want that my Scrollbar have the same length of my Chart ! it’s possible or not ? And thank you
Best Regards,
Sahar.
- sahar Les asked 9 years ago
- You must login to post comments
Hi there,
Seems there are few erros in your code:
- SciChartOverview hasn’t Grid.Column value. So overview will be placed in first column which has width 1020 pixels.
- For some reasons you set Width = 1020 for first column which should be equal to sciChartSurface.Padding.Left according to comments.
So I suppose you code should like this:
<Grid.ColumnDefinitions>
<!-- sciChartSurface.Padding.Left -->
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="{Binding ActualWidthValue, ElementName=proxy, Mode=OneWay, Converter={StaticResource DoubleToGridLengthConverter}}"/>
<!-- sciChartSurface.Padding.Right -->
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<helpers:ActualSizePropertyProxy x:Name="proxy" ... />
<SciChart:SciChartOverview Grid.Column="1" ... />
Hope it helps!
- Yura Khariton answered 9 years ago
- You must login to post comments
Hi Yura,
thanks but when i make this code :
<Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<helpers:ActualSizePropertyProxy x:Name="proxy" Element="{Binding ElementName=sciChartSurface, Path=YAxis}"/>
<SciChart:SciChartOverview Grid.Column="1" ParentSurface="{Binding ElementName=sciChartSurface,
Mode=OneWay}"
SciChart:ThemeManager.Theme="{Binding ElementName=cboTheme,
Path=SelectedItem}"
SelectedRange="{Binding XVisibleRange,
Mode=TwoWay}" Focusable="True" />
</Grid>
i have a bad result ( like the picture) !!
- sahar Les answered 9 years ago
-
Have you tried to change width in first column definition - ? Seems something occupies space in Grid but I don't know what. Could you post XAML markup with Grid and all elements within it(overview and chart)? Seems to me you need to set Grid.Column="1" on sciChartSurface instance but I'm not sure. Thanks in advance
- You must login to post comments
Please login first to submit.