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

Error using RadPanelBar within DataForm DataTemplate

1 Answer 62 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Clive Shirley
Top achievements
Rank 1
Clive Shirley asked on 09 Dec 2009, 08:04 PM
Hello,

I hope someone can help.....

I am getting the following error message when using a RadPanelBar/RadPanelBarItem control within a DataTemplate bound to a dataform.  This is easily replicable - so I hope I am doing something wrong !

Incidentally this was working fine in the Q2 drop.

Kind Regards

Clive


{System.ArgumentException: DependencyProperty Telerik.Windows.Controls.HeaderedContentControl. FocusVisualStyle cannot be set on an object of type Telerik.Windows.Controls.RadPanelBarItem.

Here is the xaml:

<UserControl x:Class="RadControlsSilverlightApplication1.MainPage"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 

    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"

    xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"

    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"

    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

  <Grid x:Name="LayoutRoot">

        <dataForm:DataForm x:Name="testForm" >

            <dataForm:DataForm.EditTemplate>

                <DataTemplate>

                    <telerikNavigation:RadPanelBar>

                        <telerikNavigation:RadPanelBarItem x:Name="FixtureSection" IsExpanded="True" IsSelected="True">

                            <telerikNavigation:RadPanelBarItem.Header>

                                <TextBox Text="Hello World" />

                            </telerikNavigation:RadPanelBarItem.Header>

                            <dataForm:DataField Label="Name">

                                <TextBox Text="{Binding Name}" />

                            </dataForm:DataField>

                            <dataForm:DataField Label="Description">

                                <TextBox Text="{Binding Description}" />

                            </dataForm:DataField>

                        </telerikNavigation:RadPanelBarItem>

                    </telerikNavigation:RadPanelBar>

                </DataTemplate>

            </dataForm:DataForm.EditTemplate>

        </dataForm:DataForm>

    </Grid>

</UserControl>


Here is the Code behind:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

namespace RadControlsSilverlightApplication1

{

    public partial class MainPage : UserControl

    {

        public MainPage()

        {

            InitializeComponent();

            this.Loaded += new RoutedEventHandler(MainPage_Loaded);

        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)

        {

            testForm.CurrentItem = new TestObject() { Description="Hello World", Name="HW"};

        }

        public class TestObject

        {

            public string Name { get; set; }

            public string Description { get; set; }

        }

    }

}

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 14 Dec 2009, 09:29 AM
Hello Clive,

This issue has been fixed with last week's internal build. Update your binaries and let me know if you still experience the same issue.


Kind regards,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
PanelBar
Asked by
Clive Shirley
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or