refactor(P5b-4): 큐·이력 리스트 ItemsSource를 선언적 XAML 바인딩으로 전환
- MainWindow.ActiveQueue/PastResults(ObservableCollection) 노출. XAML: ActiveQueueList/PastResultsList의 ItemsSource를 Window-relative 바인딩으로. 코드비하인드의 ItemsSource= 명령형 할당 제거. - 검증: 빌드 0/0, 83 테스트 그린, publish 후 메인 창 크래시 없이 로드(언핸들드 로그 없음). 리스트 렌더(큐/이력 표시)는 GUI 스모크 권장.
This commit is contained in:
parent
6a4ac2d60c
commit
fa385178b2
2 changed files with 9 additions and 4 deletions
|
|
@ -438,7 +438,8 @@
|
||||||
</Grid>
|
</Grid>
|
||||||
<ScrollViewer x:Name="ActiveQueueScroll" VerticalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="ActiveQueueScroll" VerticalScrollBarVisibility="Auto"
|
||||||
Padding="24" Visibility="Collapsed">
|
Padding="24" Visibility="Collapsed">
|
||||||
<ItemsControl x:Name="ActiveQueueList">
|
<ItemsControl x:Name="ActiveQueueList"
|
||||||
|
ItemsSource="{Binding ActiveQueue, RelativeSource={RelativeSource AncestorType=Window}}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<!-- row hover: FsListRowStyle 느낌(투명→surface hover, hairline 보더) + 좌측 형식색 accent bar -->
|
<!-- row hover: FsListRowStyle 느낌(투명→surface hover, hairline 보더) + 좌측 형식색 accent bar -->
|
||||||
|
|
@ -527,7 +528,8 @@
|
||||||
<!-- Past Results view (default) -->
|
<!-- Past Results view (default) -->
|
||||||
<ScrollViewer x:Name="PastResultsView" VerticalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="PastResultsView" VerticalScrollBarVisibility="Auto"
|
||||||
Padding="24">
|
Padding="24">
|
||||||
<ItemsControl x:Name="PastResultsList">
|
<ItemsControl x:Name="PastResultsList"
|
||||||
|
ItemsSource="{Binding PastResults, RelativeSource={RelativeSource AncestorType=Window}}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Margin="0,0,0,40">
|
<StackPanel Margin="0,0,0,40">
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
|
||||||
/// <summary>옵션 패널 XAML이 TwoWay 바인딩하는 옵션 뷰모델(품질·출력폴더).</summary>
|
/// <summary>옵션 패널 XAML이 TwoWay 바인딩하는 옵션 뷰모델(품질·출력폴더).</summary>
|
||||||
public OptionsViewModel Options => _options;
|
public OptionsViewModel Options => _options;
|
||||||
|
|
||||||
|
/// <summary>Active Queue / Past Results 리스트가 XAML에서 ItemsSource로 바인딩하는 컬렉션.</summary>
|
||||||
|
public ObservableCollection<QueueItem> ActiveQueue => _activeQueue;
|
||||||
|
public ObservableCollection<DateGroup> PastResults => _pastResults;
|
||||||
|
|
||||||
public ICommand AddFilesCommand { get; }
|
public ICommand AddFilesCommand { get; }
|
||||||
public ICommand ProcessQueueCommand { get; }
|
public ICommand ProcessQueueCommand { get; }
|
||||||
public ICommand CloseCommand { get; }
|
public ICommand CloseCommand { get; }
|
||||||
|
|
@ -48,8 +52,7 @@ public partial class MainWindow : Wpf.Ui.Controls.FluentWindow
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
ActiveQueueList.ItemsSource = _activeQueue;
|
// ActiveQueueList/PastResultsList의 ItemsSource는 XAML이 ActiveQueue/PastResults에 바인딩(선언적).
|
||||||
PastResultsList.ItemsSource = _pastResults;
|
|
||||||
|
|
||||||
InitializeOutputFormats();
|
InitializeOutputFormats();
|
||||||
LoadHistory();
|
LoadHistory();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue