本文整理汇总了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;
}
示例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();
}
示例3: ChangeModeExpanderOnExpanded
private void ChangeModeExpanderOnExpanded(object sender, RoutedEventArgs routedEventArgs)
{
ChangeModeGrid.Height = 530;
ChangeModeExpander.Height = 530;
var transform = new CompositeTransform { Rotation = 0 };
IndicatorImage.RenderTransform = transform;
}
示例4: Imagenes1_Loaded
void Imagenes1_Loaded(object sender, RoutedEventArgs e)
{
re = new Recursos();
re.reporducirSonido("/Sonidos/Voces/PintarGatoPelota.mp3");
dragTranslation = new CompositeTransform();
}
示例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")));
}
示例6: Ficha
public Ficha()
{
transform = new CompositeTransform();
this.ManipulationStarted += InicioManipulacion;
this.ManipulationDelta += Manipulacion;
this.ManipulationCompleted += FinManipulacion;
this.RenderTransform = transform;
}
示例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;
}
}
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
}
示例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")));
}
示例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")));
}
示例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;
}
示例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")));
}