개정판 8ff1bf3a
issue #1155 : thumbnailControl의 속성 DisplayColorItems,MarkupColorList의 속성 ColorList의 데이터 타입을 ObservableCollection에서 List로 변경 변경 ObservableCollection이 아닌 ThumbnailItem : INotifyPropertyChanged에서 알림을 해줘야
MarkupColorList ColorList에 Dependency Property에 Callback 함수가 호출됨.
Change-Id: I37e72ddd2553094be380c29bf5855cb90cfcca87
KCOM/Common/ThumbnailItem.cs | ||
---|---|---|
12 | 12 |
{ |
13 | 13 |
public ThumbnailItem() |
14 | 14 |
{ |
15 |
DisplayColorItems = new ObservableCollection<SetColorMarkupItem>();
|
|
15 |
DisplayColorItems = new List<SetColorMarkupItem>();
|
|
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
public Uri ImageUri { get; set; } |
19 | 19 |
|
20 |
private ObservableCollection<SetColorMarkupItem> _DisplayColorItems;
|
|
20 |
private List<SetColorMarkupItem> _DisplayColorItems;
|
|
21 | 21 |
|
22 |
public ObservableCollection<SetColorMarkupItem> DisplayColorItems
|
|
22 |
public List<SetColorMarkupItem> DisplayColorItems
|
|
23 | 23 |
{ |
24 | 24 |
get { return _DisplayColorItems; } |
25 | 25 |
set { _DisplayColorItems = value; |
KCOM/Controls/MarkupColorList.xaml.cs | ||
---|---|---|
28 | 28 |
InitializeComponent(); |
29 | 29 |
} |
30 | 30 |
|
31 |
public ObservableCollection<SetColorMarkupItem> ColorList
|
|
31 |
public List<SetColorMarkupItem> ColorList
|
|
32 | 32 |
{ |
33 |
get { return (ObservableCollection<SetColorMarkupItem>)GetValue(ColorListProperty); }
|
|
33 |
get { return (List<SetColorMarkupItem>)GetValue(ColorListProperty); }
|
|
34 | 34 |
set { SetValue(ColorListProperty, value); } |
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
// Using a DependencyProperty as the backing store for MousePosition. This enables animation, styling, binding, etc... |
38 | 38 |
public static readonly DependencyProperty ColorListProperty = |
39 |
DependencyProperty.Register("ColorList", typeof(ObservableCollection<SetColorMarkupItem>), typeof(MarkupColorList), new PropertyMetadata(new PropertyChangedCallback(OnColorListChanged)));
|
|
39 |
DependencyProperty.Register("ColorList", typeof(List<SetColorMarkupItem>), typeof(MarkupColorList), new PropertyMetadata(new PropertyChangedCallback(OnColorListChanged)));
|
|
40 | 40 |
|
41 | 41 |
private static void OnColorListChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
42 | 42 |
{ |
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
457 | 457 |
|
458 | 458 |
foreach (var item in this._thumbnailItems) |
459 | 459 |
{ |
460 |
item.DisplayColorItems = new ObservableCollection<SetColorMarkupItem>(setColorMarkupItems.Where(color => color.Page == item.PageNumber).ToList());
|
|
460 |
item.DisplayColorItems = setColorMarkupItems.Where(color => color.Page == item.PageNumber).ToList();
|
|
461 | 461 |
} |
462 | 462 |
|
463 | 463 |
Logger.sendCheckLog("SetCommentList_SelectComment.ItemsSource 설정", 1); |
내보내기 Unified diff