Binding Errors

6 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 17 Jul 2013 Link to this post

    Hi,

    using RadDiagram shows binding errors at debug:

    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartPoint; DataItem=null; target element is 'PathFigure' (HashCode=17749809); target property is 'StartPoint' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=40121966); target property is 'Point' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndPoint; DataItem=null; target element is 'PathFigure' (HashCode=45256881); target property is 'StartPoint' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=41585520); target property is 'Point' (type 'Point')

    I ran the "custom connector" from Xaml-skd to check that I have no mistake in my application - shows the same errors.

    Manfred
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 19 Jul 2013 Link to this post

    Hello ManniAT,

    This is a bug in our RadDiagram. We updated your telerik account points as a thanks for your cooperation. We also resolved it and the fixed version will be reflected in Q2 2013 SP that is about to come till the end of this month.
     

    Regards,
    Petar Mladenov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 05 Jun 2014 in reply to Petar Mladenov Link to this post

    I just encountered these errors again.  I had a working RadDiagram that followed closely to your X example.  However, when I wrapped the diagram and a RadPropertyGrid into your RadDocking control, I began getting these errors:

    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartPoint; DataItem=null; target element is 'PathFigure' (HashCode=26673201); target property is 'StartPoint' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=13045638); target property is 'Point' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndPoint; DataItem=null; target element is 'PathFigure' (HashCode=50063735); target property is 'StartPoint' (type 'Point')
    System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=28630766); target property is 'Point' (type 'Point')

    What Worked:
    <Border
                Grid.Row="1"
                Margin="0 4 0 0"
                Background="White"
                BorderBrush="#FFD6D4D4"
                BorderThickness="0 0 1 1">
     
                <Grid
                    Grid.Row="1"
                    Margin="0 4 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="250"/>
                    </Grid.ColumnDefinitions>
     
                    <Grid
                        Grid.Column="0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="3*" />
                            <RowDefinition Height="1*" />
                        </Grid.RowDefinitions>
     
                        <telerik:RadDiagram
                            Grid.Row="0"
                            Margin="5,0,0,0"
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                            x:Name="diagram"
                            MinWidth="500"
                            BorderThickness="1"
                            IsResizingEnabled="False"
                            IsRotationEnabled="False"
                            ShapeStyleSelector="{StaticResource CustomShapeStyleSelector}"
                            ConnectionStyleSelector="{StaticResource CustomConnectionStyleSelector}"
                            SelectedItem="{Binding SelectedShapeModel, Mode=TwoWay}"
                            primitives:DrawingAdorner.StrokeThickness="3"
                            GraphSource="{Binding GraphSource}">
                             
                            <primitives:ItemInformationAdorner.AdditionalContent>
                                <telerik:SettingsPane Diagram="{Binding ElementName=diagram}"/>
                            </primitives:ItemInformationAdorner.AdditionalContent>
                        </telerik:RadDiagram>
                         
                        <GridSplitter
                            Height="5"
                            Grid.Row="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Top"
                            IsTabStop="False" />
                         
                        <telerik:RadPropertyGrid
                            x:Name="groupProperties"
                            Grid.Row="1"
                            Margin="0,5,0,0"/>
                         
                    </Grid>
     
                    <GridSplitter
                        Width="5"
                        Grid.Column="1"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Stretch"/>
     
                    <Grid
                        Grid.Column="1"
                        Margin="5,0,0,0">
     
                        <GroupBox
                            Header="User List">
     
                            <telerik:RadGridView
                            x:Name="peopleGrid"
                            ItemsSource="{Binding People}"
                            AutoGenerateColumns="False"
                            EnableColumnVirtualization="False">
     
                                <telerik:RadGridView.Columns>
     
                                    <telerik:GridViewImageColumn
                                    Header="Image"
                                    DataMemberBinding="{Binding Image}"
                                    ImageHeight="32"
                                    ImageWidth="32"
                                    IsGroupable="False"/>
     
                                    <telerik:GridViewDataColumn
                                    Header="First Name"
                                    DataMemberBinding="{Binding FirstName}"
                                    IsGroupable="True"/>
     
                                    <telerik:GridViewDataColumn
                                    Header="Last Name"
                                    DataMemberBinding="{Binding LastName}"
                                    IsGroupable="True"/>
     
                                    <telerik:GridViewDataColumn
                                    Header="Job Title"
                                    DataMemberBinding="{Binding JobTitle}"
                                    IsGroupable="True"/>
     
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
     
                        </GroupBox>
                    </Grid>
                </Grid>
            </Border>


    Generated Errors:
    <Border
                Grid.Row="1"
                Margin="0 4 0 0"
                Background="White"
                BorderBrush="#FFD6D4D4"
                BorderThickness="0 0 1 1">
     
                <telerik:RadDocking>
                    <telerik:RadDocking.DocumentHost>
     
                        <telerik:RadSplitContainer>
                            <telerik:RadPaneGroup>
                                <telerik:RadPane
                                    Header="Group Diagram"
                                    CanFloat="False">
     
                                    <telerik:RadDiagram
                                        Grid.Row="0"
                                        Margin="5,0,0,0"
                                        ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                                        x:Name="diagram"
                                        MinWidth="500"
                                        BorderThickness="1"
                                        IsResizingEnabled="False"
                                        IsRotationEnabled="False"
                                        ShapeStyleSelector="{StaticResource CustomShapeStyleSelector}"
                                        ConnectionStyleSelector="{StaticResource CustomConnectionStyleSelector}"
                                        SelectedItem="{Binding SelectedShapeModel, Mode=TwoWay}"
                                        primitives:DrawingAdorner.StrokeThickness="3"
                                        GraphSource="{Binding GraphSource}">
     
                                        <primitives:ItemInformationAdorner.AdditionalContent>
                                            <telerik:SettingsPane Diagram="{Binding ElementName=diagram}"/>
                                        </primitives:ItemInformationAdorner.AdditionalContent>
                                    </telerik:RadDiagram>
     
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>
                    </telerik:RadDocking.DocumentHost>
     
                    <telerik:RadSplitContainer
                        InitialPosition="DockedRight">
                        <telerik:RadPaneGroup>
                            <telerik:RadPane
                                Header="Group Properties">
     
                                <telerik:RadPropertyGrid
                                    x:Name="groupProperties"
                                    Grid.Row="1"
                                    Margin="0,5,0,0"/>
     
                            </telerik:RadPane>
     
                            <telerik:RadPane
                                Header="People">
     
                                <GroupBox
                                    Header="User List">
     
                                    <telerik:RadGridView
                                        x:Name="peopleGrid"
                                        ItemsSource="{Binding People}"
                                        AutoGenerateColumns="False"
                                        EnableColumnVirtualization="False">
     
                                        <telerik:RadGridView.Columns>
     
                                            <telerik:GridViewImageColumn
                                                Header="Image"
                                                DataMemberBinding="{Binding Image}"
                                                ImageHeight="32"
                                                ImageWidth="32"
                                                IsGroupable="False"/>
     
                                            <telerik:GridViewDataColumn
                                                Header="First Name"
                                                DataMemberBinding="{Binding Person.FirstName}"
                                                IsGroupable="True"/>
     
                                            <telerik:GridViewDataColumn
                                                Header="Last Name"
                                                DataMemberBinding="{Binding Person.LastName}"
                                                IsGroupable="True"/>
     
                                            <telerik:GridViewDataColumn
                                                Header="Domain"
                                                DataMemberBinding="{Binding Person.DomainName}"
                                                IsGroupable="True"/>
     
                                            <telerik:GridViewDataColumn
                                                Header="User Name"
                                                DataMemberBinding="{Binding Person.LoginName}"
                                                IsGroupable="True"/>
                                        </telerik:RadGridView.Columns>
                                    </telerik:RadGridView>
     
                                </GroupBox>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
     
                    </telerik:RadSplitContainer>
     
                </telerik:RadDocking>
            </Border>




  5. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 05 Jun 2014 in reply to Joel Palmer Link to this post

    For my above post, I am using Version 2014.1.331.40.  Path:

    C:\Program Files (x86)\Telerik\UI for WPF Q1 2014\Binaries\WPF40\Telerik.Windows.Controls.Docking.dll
  6. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 05 Jun 2014 in reply to Joel Palmer Link to this post

    X Example referred to:

     StyleSelectors_WPF which uses a ModelView to populate the Grid and Node/Link StyleSelectors.
  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 09 Jun 2014 Link to this post

    Hello Joel,

    Please excuse me if my previous post have mislead you. Actually this issue is still present and it is not fixed in the RadDiagram. It is tightly coupled with the way how and when bindings are evaluated when the template is applied on the RadDiagramShapes and RadDiagramConnections. Currently we are not aware of a possible way to fix this output error or workaround it. 

    Regards,
    Petar Mladenov
    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