Binding Error with internal builds

4 posts, 2 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 14 Jan 2014 Link to this post

    Hi,

    I have a solution using RadDiagram in RadDocumentPane.
    This Solution worked with RadControls_for_WPF_2013_3_1204_Dev.
    After installing RadControls_for_WPF_2013_3_1306_DEV_hotfix the (see below) errors occured.
    Installing RadControls_for_WPF_2013_3_1313_DEV_hotfix did not solve the problem.

    My (Reduced) XAML:
    <Grid DataContext="{Binding}" x:Name="grdHolder">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <telerik:RadToggleButton IsChecked="{Binding IsPropertiesWindowHidden, Mode=TwoWay, Converter={StaticResource bInvertedConverter}}" Content="Eigenschaften" ToolTip="Eigenschaften anzeigen / verbergen" Margin="6,2" Height="24" HorizontalAlignment="Left" />
            <telerik:RadToggleButton IsChecked="{Binding IsDetailsWindowHidden, Mode=TwoWay, Converter={StaticResource bInvertedConverter}}" Content="Details" ToolTip="Detailsvorschau anzeigen / verbergen" Margin="6,2" Height="24" HorizontalAlignment="Left" />
            <telerik:RadToggleButton IsChecked="{Binding IsConditionsWindowHidden, Mode=TwoWay, Converter={StaticResource bInvertedConverter}}" Content="Bedingungen" ToolTip="Bedingungsfenster anzeigen / verbergen" Margin="6,2" Height="24" HorizontalAlignment="Left" />
        </StackPanel>
        <telerik:RadDocking Grid.Row="1">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane CanUserClose="False" CanFloat="False" CanUserPin="False" Visibility="Collapsed">
                            <Grid DataContext="{Binding DataContext, ElementName=grdHolder}" >
                                <XDGT:XDiagram x:Name="dGram" Grid.Row="1" Grid.Column="0" ZoomMinFactor="0.2" ZoomMaxFactor="10"
                                               LineBrush="{telerik:Windows8Resource ResourceKey=StrongBrush}"
                                               HiddenBrush="Orange"
                                               SelectedItem="{Binding SelectedNode, Mode=TwoWay}"
                                               AllowDelete="{Binding CanChange}"
                                               IsDraggingEnabled="{Binding CanChange}"
                                               AllowDrop="{Binding CanChange}"
                                               ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                                               ScrollViewer.VerticalScrollBarVisibility="Auto"/>
                                <XDGT:XDiagramNavigationPane  Grid.Row="1" Diagram="{Binding ElementName=dGram}"
                                                              HorizontalAlignment="Left" ThumbnailStyle="{StaticResource tnStyle}"
                                                              VerticalAlignment="Bottom"/>
                            </Grid>
                        </telerik:RadDocumentPane>
                    </telerik:RadPaneGroup >
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
            <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedRight">
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Eigenschaften" IsHidden="{Binding DataContext.IsPropertiesWindowHidden, ElementName=grdHolder, Mode=TwoWay}">
                        <telerik:RadPane.Resources>
                            <DataTemplate DataType="{x:Type VMs:PropInstructionNodeVM}">
                                <Views:PropInstructionNodeView DataContext="{Binding}" />
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type VMs:PropPartsListItemNodeVM}">
                                <Views:PropPartsListItemNodeView DataContext="{Binding}" />
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type VMs:PropProductionItemUtilizationVM}">
                                <Views:PropProductionItemUtilizationView DataContext="{Binding}" />
                            </DataTemplate>
                        </telerik:RadPane.Resources>
                        <telerik:RadPane.Content>
                            <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
                                <ContentControl Content="{Binding DataContext.PropertiesVM, ElementName=grdHolder}" />
                            </ScrollViewer>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Bedingung" IsHidden="{Binding DataContext.IsConditionsWindowHidden, ElementName=grdHolder, Mode=TwoWay}" >
                        <telerik:RadPane.Resources>
                            <DataTemplate DataType="{x:Type VMs:PropConditionVM}">
                                <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
                                    <Views:PropConditionView DataContext="{Binding}" />
                                </ScrollViewer>
                            </DataTemplate>
                        </telerik:RadPane.Resources>
                        <telerik:RadPane.Content>
                            <ContentControl Content="{Binding DataContext.ConditionVM, ElementName=grdHolder}" />
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
            <telerik:RadSplitContainer InitialPosition="DockedBottom">
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Details" IsHidden="{Binding DataContext.IsDetailsWindowHidden, ElementName=grdHolder, Mode=TwoWay}" CanDockInDocumentHost="False">
                        <telerik:RadPane.Resources>
                            <DataTemplate DataType="{x:Type VMs:WorkingInstructionVM}">
                                <Views:WorkingInstructionView DataContext="{Binding}" />
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type VMs:PartsListItemVM}">
                                <Views:PartsListItemView DataContext="{Binding}" />
                            </DataTemplate>
                            <DataTemplate DataType="{x:Type VMs:ProductionItemVM}">
                                <Views:ProductionItemView DataContext="{Binding}" />
                            </DataTemplate>
                        </telerik:RadPane.Resources>
                        <telerik:RadPane.Content>
                            <ContentControl Content="{Binding DataContext.DetailsVM, ElementName=grdHolder}" />
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>


    The Errors:
    System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=grdHolder'. BindingExpression:Path=DataContext; DataItem=null; target element is 'Grid' (Name=''); target property is 'DataContext' (type 'Object')
    System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=dGram'. BindingExpression:(no path); DataItem=null; target element is 'XDiagramNavigationPane' (Name=''); target property is 'Diagram' (type 'RadDiagram')
    System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'ElementName=DropDownButtonElement'. BindingExpression:Path=IsChecked; DataItem=null; target element is 'DropDownMenu' (Name='DropDownMenuElement'); target property is 'IsOpen' (type 'Boolean')


    The last Error is known for a long time (and also exists in my working solution - but has no negative effects so I simply ignored it)
    See:
    http://www.telerik.com/community/forums/wpf/docking/binding-error-using-raddocking-with-documenthost.aspx

    But the first two (for grdHolder and dGram) occurred first after installing the hotfixes.
    The result - no Diagram content.

    A first fix was to change the xaml like this:
    <telerik:RadDocking Grid.Row="1">
        <telerik:RadDocking.DocumentHost>
            <telerik:RadSplitContainer>
                <telerik:RadPaneGroup>
                    <telerik:RadDocumentPane CanUserClose="False" CanFloat="False" CanUserPin="False" Visibility="Collapsed">
                        <!--<Grid DataContext="{Binding DataContext, ElementName=grdHolder}">-->
                        <Grid >


    Removing the DataContext binding on the Grid brings back the diagrams functionality - but still the error:
    System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=dGram'. BindingExpression:(no path); DataItem=null; target element is 'XDiagramNavigationPane' (Name=''); target property is 'Diagram' (type 'RadDiagram')

    is there - so I have an empty NavigationPane.

    Manfred
  2. Answer
    Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 17 Jan 2014 Link to this post

    Hello Manfred,

    Thank you for bringing this to our attention.

    We successfully reproduced the explained issue and it appears that it is caused by the DocumentHost. I have logged it in our internal backlog and it will be fixed as soon as possible. However what I can suggest you for now is to use the Q3 2013 SP1 version of the controls where the issue is not present.

    I'm sorry for any inconvenience caused. I have also updated your Telerik points for the involvement.

    Regards,
    Kalin
    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. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 30 Jan 2014 Link to this post

    Hi Kalin,

    the error was introduced with an internal build.
    Now there is a new "official version" - is the bug fixed?
    Or does this release (Telerik_UI_for_WPF_2013_3_1316) still contain the bug?

    Thank you
    Manfred
  5. Answer
    Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 31 Jan 2014 Link to this post

    Hello Manfred,

    The fix of the issue will be available with the internal build next Monday (it is not available with release from this week).

    Hope this helps.

    Regards,
    Kalin
    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 >>
Back to Top