Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:11:01+00:00 2026-06-10T04:11:01+00:00

I am stuck to a data-binding issue in WPF. Following is the scenario. I

  • 0

I am stuck to a data-binding issue in WPF. Following is the scenario.

I have a Telerik’s RadTileView which is bind to an ObservableCollection of type MyItem.

public class MyItem : UserControl
    {
        public string Title { get; set; }
        public string Content { get; set; }
    }

ObservableCollection is being populated like,

        private ObservableCollection<MyItem> items_ = null;
        public ObservableCollection<MyItem> TileItems
        {
            get 
            {
                if (items_ == null)
                {
                    items_ = new ObservableCollection<MyItem>();
                    items_.Add(new MyItem() { Title = "ABC", Content = "Test Content" });
                    items_.Add(new MyItem() { Title = "DEF", Content = "Test Content1" });
                    items_.Add(new MyItem() { Title = "GHI", Content = "Test Content2" });
                }

                return items_;
            }
            set 
            {
                items_= value;
                OnPropertyChanged("TileItems");
            }
        }

and the XAML is

<DataTemplate x:Key="headerTemplate">
                        <TextBlock Text="{Binding Title, Converter={StaticResource debugconv}}"></TextBlock>
                    </DataTemplate>

<telerik:RadTileView x:Name="WidgetTileView"
                                      ItemsSource="{Binding TileItems}" ColumnWidth="Auto"
                              ItemTemplate="{StaticResource headerTemplate}">
                </telerik:RadTileView>

When I run the above code, it shows three empty RadTileView but they are empty, as in figure
Empty Tiles

If I change the MyItem as

    public class MyItem
    {
        public string Title { get; set; }
        public string Content { get; set; }
    }

Then it starts working as expected, as shown
Correct RadTileView

I am unable to figure out what is the problem with data binding when I inherit MyItem from UserControl?

Edit:
My requirement is to show the Custom UserControl in content area of RadTileView and Title text in the header area of RadTileView, how it can be achieved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:11:03+00:00Added an answer on June 10, 2026 at 4:11 am

    The controls will not use the data templates if the items are not data, plain and simple. Do not inherit from UserControl if the class is supposed to be data (you are also breaking the model-view-separation if you do).

    The item is only evaluated as one entity by the RadTileView so if the item as a whole is considered displayable the data templates are ignored. If you must do this then move the UserControl to a property and use that in the ContentTemplate (which just contains a ContentPresenter binding the Content to that property containing the UserControl).

    If you want to adhere to the model-view separation you should not inherit from any UI-related class and your Content should contain data, this can then be templated in the ContentTemplate with the UserControls you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently learning WPF (C#) and have taken the following simple data binding
I have the following very simple code: html <a data-bind=enable: selected() href=http://www.google.com>Click Me</a> javascript
I am stuck in a strange issue while reading data from serial port in
Kinda stuck here... I have an application with lets say 5000 rows of data
I have some files, consisting of end of day stock data in the following
I have a stack which contains some integer data. I want to find out
I've been kinda stuck in trying to organize data and bind them to a
I have a WPF program with two listviews which display information from two different
I'm trying to bind to some XML data from my WPF application. I've set
I am stuck in binding values from enum to RadioButton. Lets say I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.