Пример #1
0
        void Arena_Loaded(object sender, RoutedEventArgs e)
        {
            ProjectileLayerFE.IsHitTestVisible = false;
            ProjectileLayerFE.SetValue(Canvas.ZIndexProperty, 99);
            ProjectileLayerFE.SetValue(System.Windows.Media.RenderOptions.EdgeModeProperty, System.Windows.Media.EdgeMode.Aliased);
            ProjectileLayerFE.Height = 100;
            ProjectileLayerFE.Width  = 100;
            this.Children.Add(ProjectileLayerFE);
            xs = new Image();
            xs.IsHitTestVisible = false;
            mys        = new MySource();
            xs.Source  = MySource.Source;
            xs.Stretch = System.Windows.Media.Stretch.Fill;


            //  xs.SetValue(Canvas.TopProperty, 0);
            //xs.SetValue(Canvas.LeftProperty, 0);
            xs.Height = 707;
            xs.Width  = 909;
            xs.SetValue(Canvas.HorizontalAlignmentProperty, HorizontalAlignment.Stretch);
            xs.SetValue(Canvas.VerticalAlignmentProperty, VerticalAlignment.Stretch);
            xs.SetValue(Canvas.ZIndexProperty, 100);

            this.Children.Add(xs);
        }
Пример #2
0
        void Arena_Loaded(object sender, RoutedEventArgs e)
        {
            ProjectileLayerFE.IsHitTestVisible = false;
            ProjectileLayerFE.SetValue(Canvas.ZIndexProperty, 99);
            ProjectileLayerFE.SetValue(System.Windows.Media.RenderOptions.EdgeModeProperty, System.Windows.Media.EdgeMode.Aliased);
            ProjectileLayerFE.Height = 100;
            ProjectileLayerFE.Width = 100;
            this.Children.Add(ProjectileLayerFE);
            xs = new Image();
            xs.IsHitTestVisible = false;
            mys = new MySource();
            xs.Source = MySource.Source;
            xs.Stretch = System.Windows.Media.Stretch.Fill;

            
          //  xs.SetValue(Canvas.TopProperty, 0);
            //xs.SetValue(Canvas.LeftProperty, 0);
            xs.Height = 707;
            xs.Width = 909;
            xs.SetValue(Canvas.HorizontalAlignmentProperty, HorizontalAlignment.Stretch);
            xs.SetValue(Canvas.VerticalAlignmentProperty, VerticalAlignment.Stretch);
            xs.SetValue(Canvas.ZIndexProperty, 100);
            
            this.Children.Add(xs);
        }