コード例 #1
0
        private void _attachLights()
        {
            bool hasRevealBorderLight = false;
            var  element = Window.Current.Content;

            foreach (var item in element.Lights)
            {
                if (item is MyRevealBorderLight revealLight)
                {
                    RevealBorderLight    = revealLight;
                    hasRevealBorderLight = true;
                    break;
                }
            }

            if (!hasRevealBorderLight)
            {
                RevealBorderLight = new MyRevealBorderLight();
                element.Lights.Add(RevealBorderLight);
            }
            MyRevealBorderLight.AddTargetBrush(MyRevealBorderLight.GetIdStatic(), this);
        }
コード例 #2
0
 private void _unAttachLights()
 {
     MyRevealBorderLight.RemoveTargetBrush(MyRevealBorderLight.GetIdStatic(), this);
 }