The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 2 of 2

Thread: Data Binding to CLR objects, wont work?

  1. #1

    Data Binding to CLR objects, wont work?

    Okey, Ive try to solve this problem for hours now and dont, at all, know what Im doing so wrong.

    Im up 2 the tutorial Data Binding to CLR Objects, and have also done exactly what it tells me to do, all the way. Which means Ive made a new C# class in VisualStudio and when I go back to Blend again, I can see the class in my projectfiles panel but when I will bind it with +CLR objects my class is not showing up there :S

    Any ideas what to do? :S

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2008-10-26_0953.png 
Views:	40 
Size:	64.7 KB 
ID:	48271  

  2. #2
    Hi Sandra,
    Is the namespace for your FontCollection.cs file the same as that of your Window1.xaml / cs file? The reason is, if I try the following code, I am able to see FontCollection appear in the data pane:
    Code:
        public partial class Page : UserControl
        {
            public Page()
            {
                InitializeComponent();
            }
        }
    
        class FontCollection : ObservableCollection<FontFamily>
        {
            public FontCollection()
            {
                /*
                foreach (FontFamily f in Fonts.SystemFontFamilies)
                {
                    //this.Add(f);
                }*/
            }
        }
    Cheers!
    Kirupa

    Great, now even Kirupa is { facebooking | twittering }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012