Baseline sample

7 posts, 0 answers
  1. robert
    robert avatar
    27 posts
    Member since:
    Aug 2011

    Posted 16 Jul 2014 Link to this post

    Hello, i have found a interesting sample (Baseline_WPF)  in the xaml-sdk-master file.
    My problem is i need this solution for my Project but this is coded in VB.NET and i
    can't translate the c# code correctly because there a lot of special features inside like
    yield operations. Please can you help me to translate this sample to VB.NET.

    Greetings, Robert ....
  2. Polya
    Admin
    Polya avatar
    200 posts

    Posted 17 Jul 2014 Link to this post

    Hello Robert,

    We are happy to hear that our examples are helpful for your scenario.
    I have converted the Baseline project to Visual Basic and attached it in this post.

    Regards,
    Polya
    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.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. robert
    robert avatar
    27 posts
    Member since:
    Aug 2011

    Posted 18 Jul 2014 in reply to Polya Link to this post

    Thank you for your help. I used the online telerik converter but
    without success. What tool are you using or is recommended?
    Greetings, Robert ...
  5. Polya
    Admin
    Polya avatar
    200 posts

    Posted 21 Jul 2014 Link to this post

    Hello Robert,

    The Telerik Code Converter only converts code snippets. That is why for converting whole projects we use the Instant VB program, which has a free version and can be found here.

    Regards,
    Polya
    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.
     
  6. robert
    robert avatar
    27 posts
    Member since:
    Aug 2011

    Posted 22 Jul 2014 Link to this post

    Hello Polya,

    thank you for your tip. Now i have implemented the baseline and it works correctly. I have a last question. In addition to the baseline i want to draw 2 custom lines boundet to a date property defined as linedate1 and linedate2 in the custom gantttask. I have analyzed the deadline sample but without success to draw 2 lines and implement a second selector to the baseline selector. Is it possible to extend the baseline sample? It would be a great help für me. Thank you very much for your help.

    Regards,
    Robert
  7. robert
    robert avatar
    27 posts
    Member since:
    Aug 2011

    Posted 23 Jul 2014 in reply to robert Link to this post

    Hello Polya,

    now i have integrated successfully the two selectors together. Now i try to show
    a tooltip at a custom line (i.e. date) but without success.

    My template:
    <Style TargetType="base:TimeLineDeadlineContainer">
             <Setter Property="Canvas.ZIndex" Value="100"/>
             <Setter Property="BorderBrush" Value="DarkBlue"/>
             <Setter Property="BorderThickness" Value="2" />
             <Setter Property="Margin" Value="0 0 -3 0" />
             <Setter Property="ToolTipService.ToolTip" Value="{Binding OriginalEvent.TimeLineDeadlineEventInfo.LineDate1}"/>
             <Setter Property="Template">
                 <Setter.Value>
                     <ControlTemplate TargetType="base:TimeLineDeadlineContainer">
     
                          
                         <Rectangle Width="2" VerticalAlignment="Stretch" Fill="DarkBlue"  />
                         ....
    The Tooltip dosn't show any data. How can i achieve to get and show the value as tooltip?

    Regards,
    Robert


  8. Polya
    Admin
    Polya avatar
    200 posts

    Posted 23 Jul 2014 Link to this post

    Hello Robert,

    I am happy to hear that you managed to get both examples working for you.

    The issue with the missing tooltip content might be because the data context of the TimeLineDeadlineContainer is not set or is set to something unsuitable.

    Referring to the Deadline example - if in the TimeLineDeadlineContainer.DataItem we also set the container DataContext to the passed TimeLineDeadlineEventInfo - we can access all the information from the TimeLineDeadlineEventInfo in the binding of the tooltip content.

    So, for example, if we want to show the Deadline date in the tooltip of the TimeLineDeadlineContainer we should:
    Public Property DataItem() As Object
        Get
            Return Me.data
        End Get
        Set(ByVal value As Object)
            If Me.data IsNot value Then
                Me.data = value
                Dim info = TryCast(Me.data, TimeLineDeadlineEventInfo)
                If info IsNot Nothing Then
                    Me.Deadline = info.Deadline
                    Me.IsExpired = info.IsExpired
                    'Set the container DataContext to be the info.
                    Me.DataContext = info
                End If
            End If
        End Set
    End Property

    <Style TargetType="local:TimeLineDeadlineContainer">
        <Setter Property="telerik:ZIndexManager.ZIndex" Value="100" />
        <Setter Property="Margin" Value="0 0 -4 0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TimeLineDeadlineContainer">
                    ...
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTipService.ToolTip" Value="{Binding Deadline}"/>
    </Style>

    Hopefully this resolves the issue.

    Regards,
    Polya
    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.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready