2009年11月11日

Silverlight Unloaded Event & ZIndex


Silverlight 有一個問題,就是沒有提供 Unloaded Event,
如果你設計了一個 UserControl 並在 Loaded 中加入了 event
那麼這個 UserControl 若移出 Parent 後再加入,
就會再呼叫一次 Loaded,而 event 便再增加一次。

因此,圖形物件的 layer 在進行變更時,
要記得利用 Canvas.SetZIndex 來處理,
而不要用 Panel.Children.Remove() 及 Panel.Children.Add().

沒有留言:

Deploying Vue & .NET with Google OAuth on GCP Cloud Run

Deploying Vue & .NET with Google OAuth on GCP Cloud Run Deploying Vue & .NET with Google OAuth on GCP Cloud Run...