Pre loader

length of Scrollbar !

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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.

Images
  • You must to post comments
0
0

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) !!

Images
  • Yura Khariton
    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 to post comments
0
0

Hi there,

Seems there are few erros in your code:

  1. SciChartOverview hasn’t Grid.Column value. So overview will be placed in first column which has width 1020 pixels.
  2. 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!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies