--- source_files: - DataPRO/Modules/Channels/ChannelCodes/View/ChannelCodesListView.xaml.cs generated_at: "2026-04-17T16:01:12.024561+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "765fffde6c4125b2" --- # ChannelCodesListView Documentation ## 1. Purpose This module is a WPF code-behind view component for managing channel codes within the system. It provides the interaction logic for `ChannelCodesListView.xaml`, handling user interactions for two distinct lists: ISO channel codes and User-defined channel codes. The view supports filtering, sorting, selection tracking, and modification marking, delegating all business logic to an `IChannelCodesListViewModel` via data binding. --- ## 2. Public Interface ### Class: `ChannelCodesListView` **Implements:** `IChannelCodesListViewModel` | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `public ChannelCodesListView()` | Initializes the view component via `InitializeComponent()`. | ### Private Event Handlers (wired to XAML) | Method | Event Context | Behavior | |--------|---------------|----------| | `GridViewColumnHeaderSearchable_OnSearch` | Search event on `GridViewColumnHeaderSearchable` | Extracts search term from `e.OriginalSource` and column tag from sender, calls `viewModel.Filter(columnTag, searchTerm)`. | | `GridViewColumnHeader_OnClick` | Click on column header | Extracts column tag and calls `vm.Sort(columnTag, true)`. Uses `Utils.FindChild` as fallback for tag resolution. | | `ChannelCodeTextBox_KeyDown` | Key down on channel code text box | Extracts `IChannelCode` from `e.Source` DataContext, calls `vm.MarkModified(channelCode)`. | | `ChannelCodeTextBoxUser_TextChanged` | Text changed on user channel code | Calls `vm.MarkModified(channelCode)` and `vm.ValidateUser(ref notUsed1, ref notUsed2)`. | | `ChannelCodeTextBoxIso_TextChanged` | Text changed on ISO channel code | Calls `vm.MarkModified(channelCode)` and `vm.ValidateISO(ref notUsed1, ref notUsed2)`. | | `DisplayNameTextBox_KeyDown` | Key down on display name | Calls `vm.MarkModified(channelCode)`. | | `DisplayNameTextBoxUser_TextChanged` | Text changed on user display name | Calls `vm.MarkModified(channelCode)` and `vm.ValidateUser(ref notUsed1, ref notUsed2)`. | | `DisplayNameTextBoxIso_TextChanged` | Text changed on ISO display name | Calls `vm.MarkModified(channelCode)` and `vm.ValidateISO(ref notUsed1, ref notUsed2)`. | | `ISO_Checked` | ISO radio button checked | Sets `vm.ViewMode = ChannelCodesListViewModel.ViewModes.ISO`. | | `User_Checked` | User radio button checked | Sets `vm.ViewMode = Channel