Reorg window handling and add drag handler
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
<Compile Include="Controls\TaskbarButtonFlyoutTemplateSettings.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Controls\TaskbarButtonFlyout.cs" />
|
||||
<Compile Include="Views\TaskbarButtonGroupDragHandler.cs" />
|
||||
<Compile Include="Views\TaskbarButtonGroupDropHandler.cs" />
|
||||
<Compile Include="Views\TaskbarButtonGroupItemViewModel.cs" />
|
||||
<Compile Include="Views\TaskbarButtonGroupView.xaml.cs">
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TheXamlGuy.TaskbarGroup.Flyout.Foundation;
|
||||
using Windows.ApplicationModel.DataTransfer;
|
||||
|
||||
namespace TheXamlGuy.TaskbarGroup.Flyout
|
||||
{
|
||||
public class TaskbarButtonGroupDragHandler : IDragHandler<TaskbarButtonGroupView>
|
||||
{
|
||||
public Task Handle(Drag<TaskbarButtonGroupView> message, CancellationToken canellationToken = default)
|
||||
{
|
||||
message.DragEventArgs.AcceptedOperation = DataPackageOperation.Link;
|
||||
|
||||
if (message.DragEventArgs.DragUIOverride is not null)
|
||||
{
|
||||
message.DragEventArgs.DragUIOverride.IsContentVisible = true;
|
||||
message.DragEventArgs.DragUIOverride.IsGlyphVisible = false;
|
||||
message.DragEventArgs.DragUIOverride.IsCaptionVisible = false;
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<foundation:DropTarget Mediator="{x:Bind ViewModel.Mediator}" />
|
||||
</interactivity:Interaction.Behaviors>
|
||||
<StackPanel AllowDrop="True" Background="Red">
|
||||
<StackPanel AllowDrop="True">
|
||||
<TextBox HorizontalAlignment="Stretch" Text="{x:Bind ViewModel.Name, Mode=TwoWay}" />
|
||||
<GridView
|
||||
x:Name="GridView"
|
||||
|
||||
Reference in New Issue
Block a user