Drag and drop from explorer not working in WPF app packaged with MSIX

The setup:

I have a DataGrid with AllowDrop=”True”, and Drop=”MyDropEvent”. Let’s ignore the handling of the drop event, because it boils down to this:

If I attempt to drag/drop files from the Windows explorer onto my DataGrid while running my application through VS or after building to a .exe, it works: when dragging over the DataGrid, the cursor is correctly updated, and upon dropping, MyDropEvent is called.

However, if I package the same WPF application with MSIX, install the resulting msixbundle and run the installed app, dragging files from the explorer into my app just gives me the standard, red crossed out circle, and no DragOver or Drop event is ever called.

While I’ve been using DataGrid as an example, the same goes for other elements. It seems that drag/drop from the explorer is completely blocked somewhere.

I suspect this is some kind of permissions/security issue, though I don’t understand what exactly is going on or how to fix it.

I’ve checked the integrity levels for both my app and explorer.exe through Process Explorer, and both are at medium where I would expect them.

This is what my .appxmanifest looks like:


<Package
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
  IgnorableNamespaces="uap rescap uap3">

  <Identity
    ...

  <Properties>
    ...
  </Properties>

  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
  </Dependencies>

  <Resources>
    <Resource Language="x-generate"/>
  </Resources>

  <Applications>
    <Application Id="App"
      Executable="$targetnametoken$.exe"
      EntryPoint="$targetentrypoint$">
      <uap:VisualElements
        DisplayName=...
        Description=...
        BackgroundColor="transparent"
        Square150x150Logo="ImagesSquare150x150Logo.png"
        Square44x44Logo="ImagesSquare44x44Logo.png">
        <uap:DefaultTile Wide310x150Logo="ImagesWide310x150Logo.png"  Square71x71Logo="ImagesSmallTile.png" Square310x310Logo="ImagesLargeTile.png"/>
        <uap:SplashScreen Image="ImagesSplashScreen.png" />
      </uap:VisualElements>
    </Application>
  </Applications>

  <Capabilities>    
    <rescap:Capability Name="runFullTrust" />
    <rescap:Capability Name="broadFileSystemAccess" />
    <uap:Capability Name="removableStorage"/>
    <uap:Capability Name="musicLibrary"/>
    <uap3:Capability Name="backgroundMediaPlayback"/>
  </Capabilities>
</Package>

broadFileSystemAccess was my latest attempt at fixing this, but to no success.

What am I missing? I’m curious what exactly is causing this, and whether there is a fix that ideally doesn’t involve completely restructuring how I build my app. I do need an MSIX package to upload to the MS store, unfortunately.

Cheers

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật