zoukankan      html  css  js  c++  java
  • metro 拖动元素 元素 GIS

    public sealed partial class MainPage : Page
    {
    // Global Transform used to change the position of the Rectangle.
    private TranslateTransform dragTranslation;

    // Constructor
    public MainPage()
    {
    InitializeComponent();

    // Add handler for the ManipulationDelta event

    TestRectangle.ManipulationDelta += Drag_ManipulationDelta;

    dragTranslation = new TranslateTransform();
    TestRectangle.RenderTransform = this.dragTranslation;
    }

    void TestRectangle_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e)
    {

    }

    void Drag_ManipulationDelta(object sender,ManipulationDeltaRoutedEventArgs e)
    {
    // Move the rectangle.
    dragTranslation.X += e.Delta.Translation.X;
    dragTranslation.Y += e.Delta.Translation.Y;
    }

    }

    <Page
    x:Class="dragTranslationx.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:dragTranslationx"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
    <Grid.ChildrenTransitions>
    <TransitionCollection>
    <EntranceThemeTransition/>
    </TransitionCollection>
    </Grid.ChildrenTransitions>
    <Grid.Resources>
    <Storyboard x:Name="downAnimation">

    </Storyboard>
    <Storyboard x:Name="upAnimation">

    </Storyboard>
    </Grid.Resources>



    <Rectangle ManipulationMode="All" Width="200" Height="200" Fill="Beige" x:Name="TestRectangle" ></Rectangle>
    </Grid>

    </Page>

  • 相关阅读:
    ORDER BY子句
    SELECT子句
    WHERE子句
    定义数据完整性
    Microsoft Visual Studio Tips
    zz人性的经典总结54句
    About Refactor
    zz你的交际力能否通吃?
    zz一个高级主管必须明白的几点事情
    About SQLServer Transaction
  • 原文地址:https://www.cnblogs.com/gisbeginner/p/2690526.html
Copyright © 2011-2022 走看看