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

Timeline Group Height

2 Answers 59 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
ilusha
Top achievements
Rank 1
ilusha asked on 06 Jun 2014, 09:59 AM
I've started a new thread becouse that question can be interested to others members of the comunity. The exThread is: 
http://www.telerik.com/forums/timeline-group-sorting
Now my question about group height of groups in timeline control.
I have 3 groups (pic1) and i've got TimelineGroupPeriodControl instances (MainTimeline is my instance of radtimeline):

                var e = MainTimeline.ChildrenOfType<TimelineGroupPeriodControl>().ToList();
                e.ForEach(control =>
                {
                    var str = control.ActualHeight.ToString(CultureInfo.InvariantCulture);
                    builder.AppendLine(str);
                });
                MessageBox.Show(builder.ToString());

When the control is in state such as pic1 this code returns me result: 15, 15, 15;
When the items intersecs such as pic2 this code return me 15, 15, 15 too.
But the actual height of period groups is differnt in this 2 cases. How can I get the actualHeight of group. And groupName (скл... in my case) too.
Thanks!
nd one more qustion. With the new version of teleik wpf cotrols (2014) the radtimeline throws an exception in XAML visual designer. The stack trace is:

XamlParseException: TargetType "RadSlider" is not match the type of element "TimelineScrollBar".

 в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   в System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   в System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   в System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   в System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   в System.Windows.FrameworkElement.ApplyTemplate()
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   в System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   в System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Border.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Control.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)


2 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 09 Jun 2014, 03:50 PM
Hello,

I am afraid I have misled you. The name of the class that represents the groups of items is TimelineItemGroupControl. That is why, your code should look like the following code snippet:
var groups = this.RadTimeline1.ChildrenOfType<TimelineItemGroupControl>().ToList();
 
StringBuilder builder = new StringBuilder();
 
foreach (var group in groups)
{
    var str = group.ActualHeight.ToString(CultureInfo.InvariantCulture);
    builder.AppendLine(str);
}
 
MessageBox.Show(builder.ToString());

Regarding the design-time exception - unfortunately, I was not able to reproduce it. In case the problem persists, please open a new support ticket and send me a simple running project, demonstrating the problem.

Regards,
Tsvetie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
 



Regards,
Tsvetie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
ilusha
Top achievements
Rank 1
answered on 10 Jun 2014, 07:59 AM
Great Thanks! This is great solution of my problem!

 

Tags
TimeLine
Asked by
ilusha
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
ilusha
Top achievements
Rank 1
Share this question
or