mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-31 09:33:03 -06:00
GUI: move DoubleTapped handler to channel Grid inside TreeDataTemplate
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
This commit is contained in:
parent
f42ddef3e7
commit
d6a70484c1
|
|
@ -142,7 +142,6 @@
|
|||
<Border Grid.Column="1">
|
||||
<TreeView
|
||||
x:Name="AvailableChannelsTreeView"
|
||||
DoubleTapped="AvailableChannelsTreeView_OnDoubleTapped"
|
||||
ItemsSource="{Binding AvailableChannels}"
|
||||
SelectedItems="{Binding SelectedChannels}"
|
||||
SelectionChanged="AvailableChannelsTreeView_OnSelectionChanged"
|
||||
|
|
@ -161,7 +160,8 @@
|
|||
<Grid
|
||||
Background="Transparent"
|
||||
Classes.category="{Binding Channel.IsCategory}"
|
||||
ColumnDefinitions="Auto,*,Auto">
|
||||
ColumnDefinitions="Auto,*,Auto"
|
||||
DoubleTapped="ChannelGrid_OnDoubleTapped">
|
||||
<Grid.Styles>
|
||||
<Style Selector="Grid">
|
||||
<Style Selector="^:not(.category)">
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@ public partial class DashboardView : UserControl<DashboardViewModel>
|
|||
SelectionChangedEventArgs args
|
||||
) => DataContext.PullChannelsCommand.Execute(null);
|
||||
|
||||
private void AvailableChannelsTreeView_OnDoubleTapped(object? sender, TappedEventArgs args)
|
||||
private void ChannelGrid_OnDoubleTapped(object? sender, TappedEventArgs args)
|
||||
{
|
||||
// Ensure the tap was on an actual channel item, not empty space in the tree
|
||||
if (args.Source is not Control { DataContext: ChannelConnection channelConnection })
|
||||
if (sender is not Control { DataContext: ChannelConnection channelConnection })
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue