From a055108a53a01dd947f6210aff2ae788361cd51b Mon Sep 17 00:00:00 2001
From: Reza Bakhshi Laktasaraei
<74649066+rezabakhshilaktasaraei@users.noreply.github.com>
Date: Tue, 29 Apr 2025 07:06:23 +0330
Subject: [PATCH] Refactor ListBox in ProfilesView to use custom
ItemContainerStyle
- Removed unused AccessibleMyChipListBoxItem style from UserControl.Resources.
- Added a new ItemContainerStyle directly to the ListBox (lstGroup) with the following changes:
- Set Focusable to False to prevent tab focus.
- Set AutomationProperties.Name to Remarks for better accessibility.
- Used a custom ControlTemplate with a RadioButton for item selection.
This improves maintainability and ensures consistent accessibility behavior.
---
v2rayN/v2rayN/Views/ProfilesView.xaml | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml b/v2rayN/v2rayN/Views/ProfilesView.xaml
index 18431152..38b80a1f 100644
--- a/v2rayN/v2rayN/Views/ProfilesView.xaml
+++ b/v2rayN/v2rayN/Views/ProfilesView.xaml
@@ -18,9 +18,6 @@
-
@@ -29,7 +26,6 @@
x:Name="lstGroup"
MaxHeight="200"
FontSize="{DynamicResource StdFontSize}"
- ItemContainerStyle="{StaticResource AccessibleMyChipListBoxItem}"
Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}"
AutomationProperties.Name="{x:Static resx:ResUI.menuSubscription}">
@@ -37,6 +33,29 @@
+
+
+