-
-
Notifications
You must be signed in to change notification settings - Fork 453
Use ResultContextMenu instead of ContextMenu #3600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -80,8 +80,8 @@ | |||||
| public MainWindow() | ||||||
| { | ||||||
| _settings = Ioc.Default.GetRequiredService<Settings>(); | ||||||
| _theme = Ioc.Default.GetRequiredService<Theme>(); | ||||||
| _viewModel = Ioc.Default.GetRequiredService<MainViewModel>(); | ||||||
| DataContext = _viewModel; | ||||||
|
|
||||||
| InitializeComponent(); | ||||||
|
|
@@ -108,7 +108,7 @@ | |||||
| { | ||||||
| var handle = Win32Helper.GetWindowHandle(this, true); | ||||||
| _hwndSource = HwndSource.FromHwnd(handle); | ||||||
| _hwndSource.AddHook(WndProc); | ||||||
| Win32Helper.HideFromAltTab(this); | ||||||
| Win32Helper.DisableControlBox(this); | ||||||
| } | ||||||
|
|
@@ -295,14 +295,14 @@ | |||||
| // QueryTextBox.Text change detection (modified to only work when character count is 1 or higher) | ||||||
| QueryTextBox.TextChanged += (s, e) => UpdateClockPanelVisibility(); | ||||||
|
|
||||||
| // Detecting ContextMenu.Visibility changes | ||||||
| // Detecting ResultContextMenu.Visibility changes | ||||||
| DependencyPropertyDescriptor | ||||||
| .FromProperty(VisibilityProperty, typeof(ContextMenu)) | ||||||
| .AddValueChanged(ContextMenu, (s, e) => UpdateClockPanelVisibility()); | ||||||
| .FromProperty(VisibilityProperty, typeof(ResultListBox)) | ||||||
| .AddValueChanged(ResultContextMenu, (s, e) => UpdateClockPanelVisibility()); | ||||||
|
|
||||||
| // Detect History.Visibility changes | ||||||
| DependencyPropertyDescriptor | ||||||
| .FromProperty(VisibilityProperty, typeof(StackPanel)) | ||||||
| .FromProperty(VisibilityProperty, typeof(ResultListBox)) | ||||||
|
||||||
| .FromProperty(VisibilityProperty, typeof(ResultListBox)) | |
| .FromProperty(VisibilityProperty, typeof(StackPanel)) // Replace ResultListBox with the actual type of History |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jack251970 is this relevant?
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -479,7 +479,7 @@ | |
| <MultiDataTrigger.Conditions> | ||
| <!-- | ||
| <Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" /> | ||
| <Condition Binding="{Binding ElementName=ContextMenu, Path=Visibility}" Value="Collapsed" />--> | ||
| <Condition Binding="{Binding ElementName=ResultContextMenu, Path=Visibility}" Value="Collapsed" />--> | ||
|
Comment on lines
480
to
+482
|
||
| <Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" /> | ||
| <Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" /> | ||
| </MultiDataTrigger.Conditions> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Rename result list instance to
ResultContextMenuThis
ResultListBoxinstance has been renamed, aligning with the new naming convention. Please ensure corresponding bindings and any code-behind references inMainWindow.xaml.csare also updated.Run this script to verify no residual
<ContextMenu>references remain:🏁 Script executed:
Length of output: 223
Review leftover
<ContextMenu>definitionsThe search for
<ContextMenushows remaining definitions in:Please verify and update as needed:
<ContextMenu>at MainWindow.xaml:262 is the one for your renamedResultContextMenu, adjust itsx:Name, bindings and any code‐behind references to match.TextBoxContextMenuin CustomControlTemplate.xaml is unrelated, you can leave it intact. Otherwise, rename or refactor it to fit the new naming convention.🧰 Tools
🪛 GitHub Actions: Check Spelling
[warning] 460-31:
VSTHRDis not a recognized word. (unrecognized-spelling)[warning] 475-31:
VSTHRDis not a recognized word. (unrecognized-spelling)[warning] 487-31:
VSTHRDis not a recognized word. (unrecognized-spelling)[warning] 491-27:
Wndis not a recognized word. (unrecognized-spelling)[warning] 493-27:
Wndis not a recognized word. (unrecognized-spelling)[warning] 564-30:
WMPis not a recognized word. (unrecognized-spelling)[warning] 566-34:
WMPis not a recognized word. (unrecognized-spelling)[warning] 567-34:
WMPis not a recognized word. (unrecognized-spelling)[warning] 568-34:
WMPis not a recognized word. (unrecognized-spelling)[warning] 648-25:
gamemodeis not a recognized word. (unrecognized-spelling)[warning] 649-25:
gamemodeis not a recognized word. (unrecognized-spelling)[warning] 652-32:
gamemodeis not a recognized word. (unrecognized-spelling)[warning] 655-30:
positionresetis not a recognized word. (unrecognized-spelling)[warning] 658-37:
positionresetis not a recognized word. (unrecognized-spelling)[warning] 674-21:
gamemodeis not a recognized word. (unrecognized-spelling)[warning] 675-26:
positionresetis not a recognized word. (unrecognized-spelling)[warning] 680-26:
positionresetis not a recognized word. (unrecognized-spelling)[warning] 790-64:
XRatiois not a recognized word. (unrecognized-spelling)[warning] 791-63:
YRatiois not a recognized word. (unrecognized-spelling)[warning] 1005-20:
clocksbis not a recognized word. (unrecognized-spelling)[warning] 1006-20:
clocksbis not a recognized word. (unrecognized-spelling)[warning] 1007-19:
iconsbis not a recognized word. (unrecognized-spelling)[warning] 1008-19:
iconsbis not a recognized word. (unrecognized-spelling)[warning] 1013-20:
clocksbis not a recognized word. (unrecognized-spelling)[warning] 1014-19:
iconsbis not a recognized word. (unrecognized-spelling)🤖 Prompt for AI Agents