0

I am working with Caliburn.Micro (UWP). and want to run this UWP application on my UWP Caliburn.Micro project. but Not work.... :(

My Binding Knowledge maybe wrong. Could you help me ?

First Here is original UWP project from Github. It is a Drag & Drop enable GridView. Structure is very simple. There is 4 category has books. We can drag and drop a book to change category.

I want to run it on Caliburn.Micro(UWP).

enter image description here

and I make this code ( I upload it to my GitHub ). In my opinion, It work 50% ..... : )

Question #1 : How to bind book ? There is no display book items... Why ?

enter image description here

Kazuhiko Nakayama
  • 801
  • 1
  • 8
  • 24

1 Answers1

0

Question #1 : How to bind book ? There is no display book items... Why ?

The problem is that you have not initialized your data source in the user control constructor. You could use the following code:

public DragDropView()
{
    this.InitializeComponent();
    categoryCollectionViewSource.Source = new SampleData().GetCategoryDataSource();
    bookCollectionViewSource.Source = new SampleData().GetBookDataSource();
}

DragDropView.xaml

ItemsSource="{Binding Source={StaticResource categoryCollectionViewSource}, Mode=TwoWay}"

enter image description here

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36