当前位置: 首页>>代码示例>>C#>>正文


C# Media.CompositeTransform类代码示例

本文整理汇总了C#中System.Windows.Media.CompositeTransform的典型用法代码示例。如果您正苦于以下问题:C# CompositeTransform类的具体用法?C# CompositeTransform怎么用?C# CompositeTransform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CompositeTransform类属于System.Windows.Media命名空间,在下文中一共展示了CompositeTransform类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChangeModeExpanderOnCollapsed

 private void ChangeModeExpanderOnCollapsed(object sender, RoutedEventArgs e)
 {
     ChangeModeGrid.Height = 100;
     ChangeModeExpander.Height = 73;
     var transform = new CompositeTransform {Rotation = -90};
     IndicatorImage.RenderTransform = transform;
 }
开发者ID:huucp,项目名称:DiscoRobo,代码行数:7,代码来源:HelpPage.xaml.cs

示例2: azul_ManipulationCompleted_1

        // Al soltar el circulo. Comprueba coordenadas.
        private void azul_ManipulationCompleted_1(object sender, ManipulationCompletedEventArgs e)
        {
            Ellipse elipse = sender as Ellipse;
            string nombreObjeto = (sender as Ellipse).Name;
            double elipsex = Canvas.GetLeft(rect) + e.TotalManipulation.Translation.X;
            double elipsey = Canvas.GetTop(rect) + e.TotalManipulation.Translation.Y;
            //Canvas.Left="130" Canvas.Top="138"  Width="187"
            if (elipse.Name == "rojo" || elipse.Name == "azul" || elipse.Name == "amarillo")
            {
                if ((elipsex * -1) > 130 && (elipsex * -1) < 317)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }
                //??
            else
            {
                if ((e.TotalManipulation.Translation.Y * -1) > 312 && (e.TotalManipulation.Translation.Y * -1) < 560)
                {
                    CambiarColores(nombreObjeto, nombreAnterior);
                }
            }

            if (ver == 0)
            {
                nombreAnterior = (sender as Ellipse).Name;
            }
            elipse.RenderTransform = null;
            dragTranslation = new CompositeTransform();
        }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:31,代码来源:MainPage.xaml.cs

示例3: ChangeModeExpanderOnExpanded

 private void ChangeModeExpanderOnExpanded(object sender, RoutedEventArgs routedEventArgs)
 {
     ChangeModeGrid.Height = 530;
     ChangeModeExpander.Height = 530;
     var transform = new CompositeTransform { Rotation = 0 };
     IndicatorImage.RenderTransform = transform;
 }
开发者ID:huucp,项目名称:DiscoRobo,代码行数:7,代码来源:HelpPage.xaml.cs

示例4: Imagenes1_Loaded

 void Imagenes1_Loaded(object sender, RoutedEventArgs e)
 {
     re = new Recursos();
     re.reporducirSonido("/Sonidos/Voces/PintarGatoPelota.mp3");
     
     dragTranslation = new CompositeTransform();        
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:7,代码来源:Imagenes1.xaml.cs

示例5: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/44-BoxingGlove;component/MainPage.xaml", System.UriKind.Relative));
     this.ImageTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("ImageTransform")));
 }
开发者ID:1e0heen9,项目名称:wp7demo101,代码行数:8,代码来源:MainPage.g.i.cs

示例6: Ficha

 public Ficha()
 {
     transform = new CompositeTransform();
     this.ManipulationStarted += InicioManipulacion;
     this.ManipulationDelta += Manipulacion;
     this.ManipulationCompleted += FinManipulacion;
     this.RenderTransform = transform;
 }
开发者ID:jagdeveloper,项目名称:WP8,代码行数:8,代码来源:Ficha.cs

示例7: TouchFrameReported

        void TouchFrameReported(object sender, TouchFrameEventArgs e)
        {
            while (TouchPanel.IsGestureAvailable)
            {
                GestureSample gestureSample = TouchPanel.ReadGesture();
                if(gestureSample.GestureType == GestureType.Pinch)
                {
                    if(!_isScaleStarted)
                    {
                        _compositeTransform = new CompositeTransform();
                        Transforms.Children.Add(_compositeTransform);
                        _compositeTransform.CenterX = (gestureSample.Position.X + gestureSample.Position2.X) / 2;
                        _compositeTransform.CenterY = (gestureSample.Position.Y + gestureSample.Position2.Y) / 2;

                        _gestWidth = Math.Abs(gestureSample.Position.X - gestureSample.Position2.X);
                        _gestHeight = Math.Abs(gestureSample.Position.Y - gestureSample.Position2.Y);

                        _isScaleStarted = true;
                    }
                    else
                    {
                        //if (Transforms.Children.OfType<CompositeTransform>().Select(x=>x.ScaleX).Multiplication() >= 1)
                        {
                            _compositeTransform.ScaleX = Math.Abs(gestureSample.Position.X - gestureSample.Position2.X) / _gestWidth;
                        }

                        //if (Transforms.Children.OfType<CompositeTransform>().Select(x => x.ScaleY).Multiplication() >= 1)
                        {
                            _compositeTransform.ScaleY = Math.Abs(gestureSample.Position.Y - gestureSample.Position2.Y) / _gestHeight;
                        }

                    }
                }
                else if(gestureSample.GestureType == GestureType.PinchComplete)
                {
                    _isScaleStarted = false;
                }
                else if (gestureSample.GestureType == GestureType.VerticalDrag || gestureSample.GestureType == GestureType.HorizontalDrag || gestureSample.GestureType == GestureType.FreeDrag)
                {
                    if(!_isDrugStarted)
                    {
                        _compositeTransform = new CompositeTransform();
                        _drugPosition = gestureSample.Position;
                        Transforms.Children.Add(_compositeTransform);
                        _isDrugStarted = true;
                    }
                    else
                    {
                        _compositeTransform.TranslateX = gestureSample.Position.X - _drugPosition.X;
                        _compositeTransform.TranslateY = gestureSample.Position.Y - _drugPosition.Y;
                    }
                }
                else if (gestureSample.GestureType == GestureType.DragComplete)
                {
                    _isDrugStarted = false;
                }
            }
        }
开发者ID:ekutsenko-softheme,项目名称:burndowns,代码行数:58,代码来源:ChartFullscreenView.xaml.cs

示例8: Transform

 private void Transform()
 {
     CompositeTransform compositeTransform = new CompositeTransform();
     compositeTransform.Rotation = _angle;
     compositeTransform.CenterY = _arrowImage.Height/2;
     compositeTransform.TranslateX = _position.X;
     compositeTransform.TranslateY = _position.Y;
     _arrowImage.RenderTransform = compositeTransform;
 }
开发者ID:Friki,项目名称:Soccer,代码行数:9,代码来源:Arrow.cs

示例9: GameScreen

 protected GameScreen()
 {
     ScreenState = ScreenState.TransitionOn;
     TransitionPosition = 1;
     TransitionOffTime = TimeSpan.FromSeconds(0.5);
     TransitionOnTime = TimeSpan.FromSeconds(0.5);
     DebugCanvas = null;
     TxtDebug = null;
     Transform = new CompositeTransform();
 }
开发者ID:hilts-vaughan,项目名称:Farseer-Physics,代码行数:10,代码来源:GameScreen.cs

示例10: OnNavigatedFrom

 protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
 {
     if (_temp != null )
     {
         var ct = new CompositeTransform();
         ct.TranslateX = -10;
         _temp.RenderTransform = ct;
         _temp = null;
     }
     base.OnNavigatedFrom(e);
 }
开发者ID:gracepig,项目名称:SmartReader,代码行数:11,代码来源:BookListPage.xaml.cs

示例11: AnimateOneItem

 private void AnimateOneItem(object sender, GestureEventArgs e)
 {
     var grid = sender as Grid;
     if (null != grid)
     {
         var ct = new CompositeTransform();
         ct.TranslateX = 10;
         grid.RenderTransform = ct;
         _temp = grid;
     }
 }
开发者ID:gracepig,项目名称:SmartReader,代码行数:11,代码来源:BookListPage.xaml.cs

示例12: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/MySchoolApp;component/CampusMapPage.xaml", System.UriKind.Relative));
     this.pageImage = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("pageImage")));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.MyImage = ((System.Windows.Controls.Image)(this.FindName("MyImage")));
     this.transform = ((System.Windows.Media.CompositeTransform)(this.FindName("transform")));
 }
开发者ID:luqmaan,项目名称:usf-mobile,代码行数:11,代码来源:CampusMapPage.g.i.cs

示例13: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SmartLib;component/ScanPage2.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this._previewRect = ((System.Windows.Shapes.Rectangle)(this.FindName("_previewRect")));
     this.previewVideo = ((System.Windows.Media.VideoBrush)(this.FindName("previewVideo")));
     this._previewTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("_previewTransform")));
 }
开发者ID:chovik,项目名称:SmartLib-WP7,代码行数:11,代码来源:ScanPage2.g.cs

示例14: CreateDefaultScaleTransform

 private CompositeTransform CreateDefaultScaleTransform(FrameworkElement uie)
 {
     CompositeTransform trans = new CompositeTransform();
     double xScale = _zoomer.ZoomableContent.ActualWidth / uie.ActualWidth;
     double yScale = _zoomer.ZoomableContent.ActualHeight / uie.ActualHeight;
     if (!double.IsInfinity(xScale) || !double.IsInfinity(yScale))
     {
         trans.ScaleX = trans.ScaleY = Math.Min(xScale, yScale);
     }
     return trans;
 }
开发者ID:halllo,项目名称:SilverlightRun,代码行数:11,代码来源:ColdZoomContent.cs

示例15: InitializeComponent

 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ARSampleApp;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.videoRectangle = ((System.Windows.Shapes.Rectangle)(this.FindName("videoRectangle")));
     this.viewfinderBrush = ((System.Windows.Media.VideoBrush)(this.FindName("viewfinderBrush")));
     this.videoBrushTransform = ((System.Windows.Media.CompositeTransform)(this.FindName("videoBrushTransform")));
     this.arPanel = ((SharpGIS.AR.Controls.ARPanel)(this.FindName("arPanel")));
 }
开发者ID:Chengxuan,项目名称:BThere,代码行数:12,代码来源:MainPage.g.cs


注:本文中的System.Windows.Media.CompositeTransform类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。