InvalidOperationException: 当 AllowsTransparency 为 true 时,WindowStyle.None 是 WindowStyle 的唯一有效值。 StackTrace: 在 System.Windows.Window.VerifyConsistencyWithAllowsTransparency(WindowStyle style) 在 System.Windows.Window.CoerceVisibility(DependencyObject d, Object value) 在 System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks) 在 System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType) 在 System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) 在 System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 在 DynamicClass.MainWindow.新的窗口边框(Double 左, Double 上, Double 宽, Double 高) 在 DynamicClass.MainWindow.贴边隐藏功能(Window win) 在 DynamicClass.MainWindow.<>c__DisplayClass63.<OnWindowLoaded>b__33(Object sender, EventArgs e) 在 System.Windows.Window.OnLocationChanged(EventArgs e) 在 System.Windows.Window.WmMoveChangedHelper() 在 System.Windows.Window.WmMoveChanged() 在 System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)