From 64f99b813840c4fc2c9080a3c6ccbeb81c4c5589 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:00:16 +0300 Subject: [PATCH] Add transparent background to elements that have pointer events --- LightBulb/Views/Components/DashboardView.axaml | 3 ++- LightBulb/Views/Components/DashboardView.axaml.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/LightBulb/Views/Components/DashboardView.axaml b/LightBulb/Views/Components/DashboardView.axaml index 7527c6d8..989f41f6 100644 --- a/LightBulb/Views/Components/DashboardView.axaml +++ b/LightBulb/Views/Components/DashboardView.axaml @@ -119,10 +119,11 @@ Margin="0,50,0,0" HorizontalAlignment="Center" VerticalAlignment="Top" + Background="Transparent" Cursor="Hand" IsVisible="{Binding IsOffsetEnabled}" Orientation="Horizontal" - PointerPressed="ConfigurationOffsetStackPanel_OnPointerPressed"> + PointerReleased="ConfigurationOffsetStackPanel_OnPointerReleased"> diff --git a/LightBulb/Views/Components/DashboardView.axaml.cs b/LightBulb/Views/Components/DashboardView.axaml.cs index db1126e4..9e2cfd69 100644 --- a/LightBulb/Views/Components/DashboardView.axaml.cs +++ b/LightBulb/Views/Components/DashboardView.axaml.cs @@ -12,8 +12,8 @@ public partial class DashboardView : UserControl private void UserControl_OnLoaded(object? sender, RoutedEventArgs args) => DataContext.InitializeCommand.Execute(null); - private void ConfigurationOffsetStackPanel_OnPointerPressed( + private void ConfigurationOffsetStackPanel_OnPointerReleased( object? sender, - PointerPressedEventArgs args + PointerReleasedEventArgs args ) => DataContext.ResetConfigurationOffsetCommand.Execute(null); }