當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。