Пример #1
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // put four boxes adorner
            AdornerLayer.GetAdornerLayer(Btn).Add(new FourBoxes(Btn));

            // put an button adorner
            Button inAdorner = new Button()
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                Content = "X",
            };

            inAdorner.Click += inAdorner_Click;
            ControlAdorner adorner = new ControlAdorner(Btn)
            {
                Child = inAdorner,
            };
            AdornerLayer.GetAdornerLayer(Btn).Add(adorner);
        }
Пример #2
0
        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            // put four boxes adorner
            AdornerLayer.GetAdornerLayer(Btn).Add(new FourBoxes(Btn));


            // put an button adorner
            Button inAdorner = new Button()
            {
                HorizontalAlignment = HorizontalAlignment.Right,
                Content             = "X",
            };

            inAdorner.Click += inAdorner_Click;
            ControlAdorner adorner = new ControlAdorner(Btn)
            {
                Child = inAdorner,
            };

            AdornerLayer.GetAdornerLayer(Btn).Add(adorner);
        }