我创建了一个ContentDialog来应用一个Style(我不能用一个Message Dialog),但我遇到问题,它不可移动
所以可以使这个ContentDialog可以移动,我试图设置ManipulationMode="Rotate"
并且我已经像这样实现了ManipulationDelta="Localisation_ManipulationDelta"
:
MyContentDialog.xaml.cs:
private void Localisation_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var ct = (ContentDialog)sender;
var currentProjection = ct.Projection as PlaneProjection ?? new PlaneProjection();
ct.Projection = new PlaneProjection() { GlobalOffsetX = currentProjection.GlobalOffsetX + e.Delta.Translation.X, GlobalOffsetY = currentProjection.GlobalOffsetY + e.Delta.Translation.Y };
}
但它不起作用,ContentDialog不会移动:(
感谢您的帮助