Interval-Buttons only visible when Width set

2 posts, 0 answers
  1. Peter
    Peter avatar
    28 posts
    Member since:
    Oct 2006

    Posted 30 Apr 2011 Link to this post


    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
  2. Yavor
    Yavor avatar
    401 posts

    Posted 04 May 2011 Link to this post

    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:

        <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:CenturyInterval />
                <telerik:DecadeInterval />
                <telerik:YearInterval />
                <telerik:QuarterInterval />
                <telerik:MonthInterval />
                <telerik:WeekInterval />
                <telerik:DayInterval />
                <telerik:HourInterval />
                <telerik:RadLinearSparkline ItemsSource="{Binding Data}" XValuePath="Date" YValuePath="Value" />

    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.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top