Exemplo n.º 1
0
        private void Step_Unloaded(object sender, RoutedEventArgs e)
        {
            AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);

            if (layer != null)
            {
                if (this.MoveChrome != null)
                {
                    layer.Remove(this.MoveChrome);
                    this.MoveChrome = null;
                }

                if (this.ResizedChrome != null)
                {
                    layer.Remove(this.ResizedChrome);
                    this.ResizedChrome = null;
                }
            }
        }
Exemplo n.º 2
0
 private void ShowResizedChrome()
 {
     if (this.ResizedChrome == null)
     {
         AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);
         if (layer != null)
         {
             this.ResizedChrome = new StepResizedAdorner(this);
             layer.Add(this.ResizedChrome);
             if (this.IsResized)
             {
                 this.ResizedChrome.Visibility = System.Windows.Visibility.Visible;
             }
             else
             {
                 this.ResizedChrome.Visibility = System.Windows.Visibility.Collapsed;
             }
         }
     }
     else
     {
         this.ResizedChrome.Visibility = System.Windows.Visibility.Visible;
     }
 }