This might be two problems, but I think they might be related.
I'm putting custom content inside of a TimeBar. I dynamically create the UI and add it as children of a StackPanel, which is the only child of the TimeBar itself. Initially, the stack panel is empty. The first problem is the time scales are not drawn. There's no intervals (12:01, 12:02, etc) and there's no "12:00 AM" level either.
When I fill in the content, nothing is shown at first, but if I touch the time slider, the contents are drawn as expected. If I alter the UI elements after they're created, the same issue occurs. The changes aren't shown at first, but the contents are redrawn properly after I touch the time slider. The time interval labels are still not shown.
Here is my TimeBar:
I have another TimeBar which is almost identical, but doesn't seem to have either issue. The only difference I can see is the second one has content added as part of the constructor, but this one doesn't have any content until the user adds something.
Is there an issue with starting with the TimeBar having no actual contents?
Is there a way to force the TimeBar to redraw its contents? UpdateLayout and InvalidateArrange didn't seem to work.
I'm putting custom content inside of a TimeBar. I dynamically create the UI and add it as children of a StackPanel, which is the only child of the TimeBar itself. Initially, the stack panel is empty. The first problem is the time scales are not drawn. There's no intervals (12:01, 12:02, etc) and there's no "12:00 AM" level either.
When I fill in the content, nothing is shown at first, but if I touch the time slider, the contents are drawn as expected. If I alter the UI elements after they're created, the same issue occurs. The changes aren't shown at first, but the contents are redrawn properly after I touch the time slider. The time interval labels are still not shown.
Here is my TimeBar:
<
telerik:RadTimeBar
x:Name
=
"tbTimeline"
Grid.Column
=
"1"
Background
=
"Transparent"
PeriodStart
=
"2011-01-01 12:00:00 AM"
PeriodEnd
=
"2011-01-01 12:11:00 AM"
SelectionStart
=
"2011-01-01 12:03:00 AM"
SelectionEnd
=
"2011-01-01 12:03:06 AM"
MaxSelectionRange
=
"0.00:00:06"
MinSelectionRange
=
"0.00:00:06"
>
<
telerik:RadTimeBar.Resources
>
<
Style
TargetType
=
"telerik:ShadeControl"
>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
</
Style
>
</
telerik:RadTimeBar.Resources
>
<
telerik:RadTimeBar.Intervals
>
<
telerik:DayInterval
/>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
IntervalSpans
=
"1,5,10,15,30"
/>
<
telerik:SecondInterval
/>
</
telerik:RadTimeBar.Intervals
>
<
StackPanel
x:Name
=
"spContents"
/>
</
telerik:RadTimeBar
>
I have another TimeBar which is almost identical, but doesn't seem to have either issue. The only difference I can see is the second one has content added as part of the constructor, but this one doesn't have any content until the user adds something.
Is there an issue with starting with the TimeBar having no actual contents?
Is there a way to force the TimeBar to redraw its contents? UpdateLayout and InvalidateArrange didn't seem to work.