Skip to content

fix: Simulate Platform/AppType ComboBox InvalidCastException and layout#37

Merged
JusterZhu merged 1 commit into
mainfrom
fix/platform-apptype-binding
May 20, 2026
Merged

fix: Simulate Platform/AppType ComboBox InvalidCastException and layout#37
JusterZhu merged 1 commit into
mainfrom
fix/platform-apptype-binding

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

Fix two bugs:

  1. InvalidCastException when selecting Platform/AppType in ComboBox

    • Config.Platform was int, ComboBox.ItemsSource was PlatformItem[] → type mismatch
    • Changed to PlatformItem/AppTypeItem records with default values
  2. Missing default selection and layout

    • Platform defaults to 'Windows', AppType defaults to 'ClientApp'
    • AppSecret + ProductID moved to same row for cleaner 2-column layout
    • SelectedIndex=0 ensures ComboBox shows default

Build: 0 errors

- Changed Config.Platform from int to PlatformItem (with default 'Windows')
- Changed Config.AppType from int to AppTypeItem (with default 'ClientApp')
- Moved PlatformItem/AppTypeItem records to SimulateConfigModel.cs
- Fixed XAML SelectedItem binding (no more InvalidCastException)
- Updated SimulationService and ReportGeneratorService to use .Value/.DisplayName
- Layout: AppSecret + ProductID on same row, ComboBox defaults via SelectedIndex=0
Copilot AI review requested due to automatic review settings May 20, 2026 15:26
@JusterZhu JusterZhu merged commit 99419ac into main May 20, 2026
1 check failed
@JusterZhu JusterZhu deleted the fix/platform-apptype-binding branch May 20, 2026 15:28
@JusterZhu JusterZhu review requested due to automatic review settings May 20, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant