We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfAccordion converter error

Thread ID:

Created:

Updated:

Platform:

Replies:

127553 Nov 22,2016 08:07 PM UTC Nov 23,2016 07:09 AM UTC UWP 1
loading
Tags: SfAccordion
rdm
Asked On November 22, 2016 08:07 PM UTC

Hi,

If I use datacontext in page like this:

namespace SfAccordionSample
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
            this.DataContext = new MyViewModel();
        }
    }

    public class MyViewModel
    {
        public string MyText { get; set; }
    }
}
XAML:
<Page 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:layout="using:Syncfusion.UI.Xaml.Controls.Layout"
    x:Class="SfAccordionSample.MainPage"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <TextBox Text="{Binding MyText}" Width="200" Margin="20"></TextBox>
    
        <layout:SfAccordion HorizontalAlignment="Center" VerticalAlignment="Center" Height="500" Width="500">
            <layout:SfAccordionItem Header="WinRT" Content="WinRT"/>
            <layout:SfAccordionItem Header="Windows Phone" Content="Windows Phone"/>
            <layout:SfAccordionItem Header="WPF" Content="WPF"/>
            <layout:SfAccordionItem Header="Silverlight" Content="Silverlight"/>
        </layout:SfAccordion>
    </Grid>
</Page>

I get this errors:
Error: Converter failed to convert value of type 'SfAccordionSample.MyViewModel' to type 'DataTemplate'; BindingExpression: Path='' DataItem='SfAccordionSample.MyViewModel'; target element is 'Syncfusion.UI.Xaml.Controls.Layout.SfAccordionItem' (Name='null'); target property is 'ContentTemplate' (type 'DataTemplate'). 
Error: Converter failed to convert value of type 'SfAccordionSample.MyViewModel' to type 'DataTemplate'; BindingExpression: Path='' DataItem='SfAccordionSample.MyViewModel'; target element is 'Syncfusion.UI.Xaml.Controls.Layout.SfAccordionItem' (Name='null'); target property is 'HeaderTemplate' (type 'DataTemplate'). 

What I am doing wrong, or this is a bug?

Thanks,
Radim

Vijayalakshmi Roopkumar [Syncfusion]
Replied On November 23, 2016 07:09 AM UTC

Hi Radim,

We were able to reproduce the reported issue with SfAccordion and have logged a defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents 

Regards,
Vijayalakshmi V.R. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;