This is a migrated thread and some comments may be shown as answers.

Interval-Buttons only visible when Width set

1 Answer 93 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 30 Apr 2011, 09:20 AM
Hi,

having a day spent on getting TimeBar working I found that bug: The Week/Month/Day Buttons on top and bottom of TimeBar only show up if the component or at least one of its parents has a fixed width set. I'm using it in a Navigation Application where pages do not have a specific width which causes the buttons to stay hidden.

Hope this could be fixed in future versions as I would really appreciate to set Width on Auto and HorizontalAlignment to Stretch in my application.

Thanks in advance!

Peter Schmidt

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 04 May 2011, 09:27 AM
Hello Hans-Peter Schmidt,

We have tested the RadTimeBar in situations with auto scaling width and height and it works as expected. The problems appear when it is placed in a container that measures its children with infinity (such as Canvas and StackPanel) since the RadTimeBar doesn't have a default size. Take a look at the following markup:

<Grid>
    <telerik:RadTimeBar Name="timeBar1" VerticalAlignment="Top" Height="150" Width="Auto" HorizontalAlignment="Stretch"
                    IsSnapToIntervalEnabled="{Binding ElementName=checkBox1, Path=IsChecked}"
                    PeriodStart="{Binding PeriodStart, Mode=TwoWay}" PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}"
                    VisiblePeriodStart="{Binding VisiblePeriodStart, Mode=TwoWay}" VisiblePeriodEnd="{Binding VisiblePeriodEnd, Mode=TwoWay}"
                    SelectionStart="{Binding SelectedPeriodStart, Mode=TwoWay}" SelectionEnd="{Binding SelectedPeriodEnd, Mode=TwoWay}">
        <telerik:RadTimeBar.Intervals>
            <telerik:CenturyInterval />
            <telerik:DecadeInterval />
            <telerik:YearInterval />
            <telerik:QuarterInterval />
            <telerik:MonthInterval />
            <telerik:WeekInterval />
            <telerik:DayInterval />
            <telerik:HourInterval />
        </telerik:RadTimeBar.Intervals>
        <telerik:RadTimeBar.Content>
            <telerik:RadLinearSparkline ItemsSource="{Binding Data}" XValuePath="Date" YValuePath="Value" />
        </telerik:RadTimeBar.Content>
    </telerik:RadTimeBar>
</Grid>

This markup presents a timeBar placed within a Grid that stretches it to fit the available width and the buttons appear as expected. You can experiment with a border, as borders also don't have a default size. If you find yourself in trouble please share an example project we can examine and advice you further.


Greetings,
Yavor Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TimeBar
Asked by
Peter
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or