Windows Phone UI控件
生活随笔
收集整理的這篇文章主要介紹了
Windows Phone UI控件
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
培訓(xùn)第一章XAML介紹屬性設(shè)置設(shè)置方式:1: 特性設(shè)置2: 使用屬性元素屬性繼承XAML中的顏色和畫刷Content屬性資源定義和訪問共享機(jī)制 畫刷 外觀 文字等Style使用與繼承Style是屬性集合,也屬于資源,多用于對象元素主題與漸變使用Windows Phone預(yù)定了很多資源,通過StaticResource來用這些資源資源包括:顏色,畫刷,字體名稱,字體大小,邊距等培訓(xùn)第二章 UI控件基礎(chǔ)控件控件繼承圖布局控件Grid 支持網(wǎng)格布局自定義行列數(shù)Grid.RowDefinitions 定義行Grid.ColumnDefinitions 定義列Auto表示此行根據(jù)內(nèi)容自動調(diào)整*代表取余下的長度Canvas 絕對布局的容器控件使用Canvas.Left和Canvas.TopCanvas.Zindex處理疊加處理StackPanel使多個子控件按照橫向或者縱向排列Orientation(排列方向)HorizontalVertical三個Panel的區(qū)別Border控件繪制邊框扮演容器控件角色I(xiàn)mage控件顯示本地或者遠(yuǎn)程圖片可以對圖片進(jìn)行裁剪,MaskShape控件用于繪制幾何圖形主要包括的控件Ellipse(橢圓)Polygon(多邊形)Control控件按鈕和選擇控件按鈕:Button與用戶交互Button可以做如下風(fēng)格內(nèi)嵌圖片背景色設(shè)置背景畫刷設(shè)置背景為圖片畫刷HyperlinkButton用來作為超鏈接按鈕支持頁面導(dǎo)航設(shè)置鏈接屬性:NavigateUri="Http://";NavigateUri="/MainPage.xaml";RepeatButton按下時,不斷的觸發(fā)Click事件選擇控件:CheckBox(選擇框控件)為用戶提供選項,一般用于多選支持三態(tài):選中,中間態(tài),未選中注意:要使中間態(tài)有效需要設(shè)置如下: IsThreeState="true"ReadioButton用戶選擇控件,用于單選分組方式有兩種1:不同的分組,放到不同的容器2:通過GruoupName屬性Slider(滑桿控件)以拖動方式在指定范圍內(nèi)進(jìn)行屬性O(shè)rientation指定水平或者垂直屬性Maximum和Minimum用于定義文本控件TextBlock強(qiáng)大的文本標(biāo)簽lnlines(內(nèi)聯(lián)屬性)是LineBreak和Run對象的集合一個內(nèi)聯(lián)中,可以有多個LineBreakLineBreak表示換行Run可以對文本設(shè)置不同的字體顏色TextBox普通的文本采集控件支持換行TextWrapping="Wrap"InputScope限定輸入內(nèi)容PasswordBox密碼采集控件屬性PasswordChanItem控件Pivot控件(樞軸控件)虛擬出比手機(jī)寬度更寬的空間水平方式組織多個屏幕內(nèi)容Pivot包含Pivotltem類型的子項Pivotltem里面可以是不同的控件Panorama控件(全景控件)虛擬出比手機(jī)寬度更寬的空間水平方式組織多個屏幕內(nèi)容Panorama包含PanoramaItem類型ScrollViewer當(dāng)子控件尺寸超出其大小時,可以進(jìn)行拖動瀏覽滾動條屬性(默認(rèn)只能垂直滾動)HorizontalScrollBarVisibilityVerticalScrollBarVisibilityPropressBar(進(jìn)度條)進(jìn)度條控件有兩種類型進(jìn)度遞增幾個小點不斷循環(huán)當(dāng)知道具體的進(jìn)度時,采用第一種,當(dāng)進(jìn)度不明確時,可采用第二種ToolKit控件ToolKit介紹與使用微軟Siverlight團(tuán)隊開發(fā)的一個產(chǎn)品,為了豐富windows phone的UI控件導(dǎo)航效果(翻頁特效)ListPicker列表選擇控件相當(dāng)于Windows中的ComboBox控件ListPickerItem:集合項PhoneTextBox高級的TextBox支持:Hint提示Actionlcon(動作圖標(biāo))字?jǐn)?shù)限制提示TiltEffect(控件傾斜)替代用戶按下(pressed)和未按下(unpressed)三個主要屬性TiltableltemsIsTiltEnabledSupressTile使用方法s1: 全局傾斜2: 應(yīng)用到某個控件上3: 靜止傾斜4: 添加更多的控件到TiltableItems中 HubTile輪詢磁貼可以使用圖片,標(biāo)題,消息和通知支持反轉(zhuǎn)事件響應(yīng) 事件 簡介路由事件事件的傳遞從頂層控件傳遞到PhoneApplicationFrame一些常見的事件:PropertyChanged----屬性更改Click---單擊頁面導(dǎo)航相關(guān)事件應(yīng)用程序狀態(tài)變化通知事件觸摸原生觸摸程序級別提供比較低層的觸控編程接口注冊Touch.FrameReported事件事件信息存放在TouchFrameEvent參數(shù)屬性:Timestamp:獲取事件高級觸摸Manipulation手勢識別
<Grid x:Name="LayoutRoot" Background="Transparent"><!--<Grid Margin="10,0,0,0"><Grid.RowDefinitions><RowDefinition Height="130" /><RowDefinition Height="130" /><RowDefinition Height="*" /><RowDefinition Height="130" /><RowDefinition Height="130" /></Grid.RowDefinitions><Grid x:Name="RowOne" Grid.Row="0"><Grid.ColumnDefinitions><ColumnDefinition Width="120" /><ColumnDefinition Width="120" /><ColumnDefinition Width="120" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions><Button Grid.Column="0"Content="日歷"Style="{StaticResource gb}" /><Button Grid.Column="1"Content="系統(tǒng)"Style="{StaticResource gb}" /><Button Grid.Column="2"Content="網(wǎng)絡(luò)"Style="{StaticResource gb}" /><Button Grid.Column="3"Content="短信"Style="{StaticResource gb}" /></Grid><Grid Grid.Row="1"><Button Width="120"HorizontalAlignment="Left"Content="視頻"Style="{StaticResource gb}" /><Button Width="120"HorizontalAlignment="Right"Content="錄音"Style="{StaticResource gb}" /></Grid><Grid Grid.Row="2"><Button Width="400"Content="商店"FontSize="60"Style="{StaticResource gb}" /></Grid><Grid Grid.Row="3"><Button HorizontalAlignment="Left"Content="幫助"Style="{StaticResource gb}" /><Button HorizontalAlignment="Right"Content="設(shè)置"Style="{StaticResource gb}" /></Grid><Grid Grid.Row="4"><Grid.ColumnDefinitions><ColumnDefinition Width="120" /><ColumnDefinition Width="120" /><ColumnDefinition Width="120" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions><Button Grid.Column="0"Content="閱讀"Style="{StaticResource gb}" /><Button Grid.Column="1"Content="UC"Style="{StaticResource gb}" /><Button Grid.Column="2"Content="QQ"Style="{StaticResource gb}" /><Button Grid.Column="3"Content="升級"Style="{StaticResource gb}" /></Grid></Grid>--><!--<Canvas Width="100"Height="100"Background="Brown"Left="150"Top="150"ZIndex="3" /><Canvas Width="200"Height="200"Background="Blue"Left="100"Top="100"ZIndex="2" /><Canvas Width="300"Height="300"Background="Chartreuse"Left="50"Top="50"ZIndex="1" />--><!-- 靠沒達(dá)到理想的效果 --><!--<StackPanel Orientation="Vertical"><Button Height="150" Content="確定" /><Grid Height="300" Background="Brown"><StackPanel Orientation="Horizontal"><Button Height="100" Content="登錄" /><Button Height="100" Content="退出" /></StackPanel></Grid></StackPanel>--><!--<Border Width="400"Height="200"Margin="28,150,28,275"Background="Red"BorderBrush="Green"BorderThickness="50,0,50,0"CornerRadius="100"><Button Content="Button" /></Border>--><!--<Image Width="339"Height="244"HorizontalAlignment="Center"Source="./Windows-Phone-8.jpg" />--><!--<Grid x:Name="ContentPanel"Grid.Row="1"Margin="12,0,12,0"><StackPanel Grid.Row="0" Margin="12,17,0,28"><Ellipse Width="200"Height="200"Fill="Green" /><Rectangle Width="200"Height="50"Fill="Red" /></StackPanel></Grid>--><!-- button --><!--<Button Name="button1"Width="321"Height="89"Margin="87,-5,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"><Button.Content><Image Width="218" Source="Windows-Phone-8.jpg" /></Button.Content></Button><Button Name="button2"Width="321"Height="72"Margin="87,82,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="#FFB81BD4"BorderBrush="CadetBlue"Content="Button" /><Button Name="button3"Width="321"Height="72"Margin="87,153,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Content="Button"><Button.Background><LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5"><GradientStop Offset="0" Color="BlueViolet" /><GradientStop Offset="1" Color="CadetBlue" /></LinearGradientBrush></Button.Background></Button><Button Name="button4"Height="72"Margin="87,225,48,0"VerticalAlignment="Top"Content="Button"><Button.Background><ImageBrush ImageSource="Windows-Phone-8.jpg" /></Button.Background></Button><HyperlinkButton Name="htperlinkButton1"Width="321"Height="66"Margin="87,391,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Brown"Content="www.baidu.com"NavigateUri="Http://www.baidu.com"TargetName="devdiv" /><HyperlinkButton Name="hyperlinkButton2"Width="321"Height="59"Margin="87,309,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Chartreuse"Content="MainPage"NavigateUri="MainPage.xaml" /><RepeatButton Name="repeatButton"Width="321"Height="81"Margin="87,462,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="DarkBlue"Click="repeaBtn_Click"Content="0"Delay="400" />--><!-- CheckBox --><!--<CheckBox Name="mychkBox"Width="190"VerticalAlignment="Top"Background="Brown"Checked="chkBox_Checked"Foreground="Chartreuse"IsThreeState="True"Unchecked="chkBox_Unchecked"><CheckBox.RenderTransform><CompositeTransform ScaleX="1.5" ScaleY="1.5" /></CheckBox.RenderTransform></CheckBox><RadioButton Name="radioButton1"Width="220"Height="72"Margin="145,225,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Blue"Content="男" /><RadioButton Name="radioButton2"Width="220"Height="72"Margin="245,225,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Blue"Content="女" />--><!-- Slider --><!--<TextBlock Name="sliderText" /><Slider Name="slider"Width="407"Height="115"Margin="49,482,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"LargeChange="2"Maximum="100"Minimum="0"SmallChange="0.1"ValueChanged="slider_ValueChanged" /><Slider Name="slider2"Width="59"Height="325"Margin="6,0,0,55"HorizontalAlignment="Left"VerticalAlignment="Bottom"Background="Brown"BorderBrush="Chartreuse"Foreground="Black"Orientation="Vertical"ValueChanged="slider_ValueChanged" />--><!-- TextBlock --><!--<StackPanel Width="456"Height="607"HorizontalAlignment="Left"VerticalAlignment="Top"><TextBlock Width="253"Height="114"Margin="87,0,0,0"HorizontalAlignment="Left"TextWrapping="Wrap"><TextBlock.Inlines><Run FontSize="30"FontStyle="Italic"FontWeight="Thin"Foreground="#ff1fdb3c"Text="Windows Phone 8" /><LineBreak /><Run FontSize="30"Foreground="Blue"Text="開發(fā)" /><Run FontSize="50"Foreground="Chartreuse"Text="體驗" /></TextBlock.Inlines></TextBlock><TextBox Width="410"Height="221"Margin="87,0,0,0"HorizontalAlignment="Left"VerticalAlignment="Center"InputScope="Text"Text="TextBox"TextWrapping="Wrap" /><PasswordBox Width="410"Height="93"Margin="36,0,0,0"HorizontalAlignment="Left"PasswordChar="*" /></StackPanel>--><!-- pivot --><!--<phone:Pivot Title="Pivot控件"><phone:Pivot.Background><ImageBrush ImageSource="Windows-Phone-8.jpg" /></phone:Pivot.Background><phone:PivotItem Header="文本"><TextBox Width="436"Height="589"Margin="10,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="BlueViolet"Foreground="CadetBlue"Text=" W Indows Phone 8是微軟公司6月21日最新發(fā)布的一款手機(jī)操作系統(tǒng),是Windows Phone系統(tǒng)的最新版本,也是目前Windows Phone的第三個大型版本。Windows Phone 8采用和Windows 8相同的針對移動平臺精簡優(yōu)化NT內(nèi)核并內(nèi)置諾基亞地圖。"TextWrapping="Wrap" /></phone:PivotItem><phone:PivotItem Header="圖片"><ScrollViewer Name="scrollViewer1"Width="446"Height="597"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Chartreuse"HorizontalScrollBarVisibility="Auto"VerticalScrollBarVisibility="Auto"><Image Name="img"Width="800"Height="600"Source="Windows-Phone-8.jpg" /></ScrollViewer></phone:PivotItem></phone:Pivot>--><!--<phone:Panorama Title="Panorama控件"><phone:Panorama.Background><ImageBrush ImageSource="Windows-Phone-8.jpg" /></phone:Panorama.Background><phone:PanoramaItem Header="文本"><TextBox Width="436"Height="468"Margin="0,0,0,15"HorizontalAlignment="Left"VerticalAlignment="Bottom"Background="Brown"Foreground="CadetBlue"Text="WIndows Phone 8是微軟公司6月21日最新發(fā)布的一款手機(jī)操作系統(tǒng),是Windows Phone系統(tǒng)的最新版本,也是目前Windows Phone的第三個大型版本。Windows Phone 8采用和Windows 8相同的針對移動平臺精簡優(yōu)化NT內(nèi)核并內(nèi)置諾基亞地圖。"TextWrapping="Wrap" /></phone:PanoramaItem><phone:PanoramaItem Header="圖片"><ScrollViewer Name="scrollViewer1"Width="446"Height="600"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Chocolate"HorizontalScrollBarVisibility="Auto"VerticalScrollBarVisibility="Auto"><Image Name="img"Width="800"Height="600"Source="Windows-Phone-8.jpg"Stretch="Fill" /></ScrollViewer></phone:PanoramaItem></phone:Panorama>--><!--<ScrollViewer Name="scrollViewer1"Width="362"Height="362"Margin="41,67,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="DarkKhaki"HorizontalScrollBarVisibility="Auto"VerticalScrollBarVisibility="Auto"><Image Name="img"Width="500"Height="400"Source="Windows-Phone-8.jpg"Stretch="Fill" /></ScrollViewer>--><!-- 進(jìn)度條 ProgressBar --><!--<ProgressBar Name="progressBar2"Width="431"Height="34"Margin="25,317,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"IsIndeterminate="True" /><ProgressBar Name="progressbar1"Width="431"Height="20"Margin="25,204,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Value="50" />--><!-- ToolKit --><!--<Grid x:Name="ContentPanel"Grid.Row="1"Margin="12,0,12,0"><toolKit:PhoneTextBox Margin="-10,96,10,435"ActionIcon="Windows-Phone-8.jpg"ActionIconTapped="Search_ActionIconTapped"Hint="請輸入搜索內(nèi)容"HintStyle="{StaticResource HintCustomStyle}"LengthIndicatorVisible="True"MaxLength="10" /><toolKit:ListPicker><toolKit:ListPickerItem Content="睡覺" /><toolKit:ListPickerItem Content="上班" /><toolKit:ListPickerItem Content="下班" /></toolKit:ListPicker><Button Name="button"Width="251"Margin="80,206,0,342"HorizontalAlignment="Left"Background="Red"Content="斜"Foreground="White" /></Grid>--><!--<Grid.RowDefinitions><RowDefinition Height="*" /><RowDefinition Height="*" /><RowDefinition Height="*" /><RowDefinition Height="*" /></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition Width="*" /><ColumnDefinition Width="*" /></Grid.ColumnDefinitions><toolKit:HubTile Title="藝術(shù)"Grid.Row="0"Grid.Column="0"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="BurlyWood"DisplayNotification="true"Message="多彩貴州 舞蹈大賽決賽在貴州電視臺演播廳舉行。圖為女子集體民族民間舞比賽中。黔中早報 羅禹 攝"Notification="5"Source="/images/00.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="奧運"Grid.Row="0"Grid.Column="1"Width="218"Height="172"HorizontalAlignment="Left"VerticalAlignment="Top"Background="BurlyWood"DisplayNotification="True"Message="英國倫敦,2012奧運會閉幕式現(xiàn)場。"Notification="6"Source="/images/01.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="風(fēng)情"Grid.Row="1"Grid.Column="0"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="CadetBlue"DisplayNotification="True"Message="印度孟買,印度教信徒們在疊羅漢,組成人體金字塔。疊羅漢是印度教徒的傳統(tǒng)活動,以慶祝神明克利須那神"Notification="8"Source="/images/10.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="少兒"Grid.Row="1"Grid.Column="1"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Chocolate"DisplayNotification="true"Message="在安徽省亳州市文帝東路亳州體操訓(xùn)練基地體操館內(nèi),孩子們正在教練的指導(dǎo)下強(qiáng)化訓(xùn)練。"Notification="10"Source="/images/11.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="國際"Grid.Row="2"Grid.Column="0"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Coral"DisplayNotification="true"Message="一名男子正在參拜位于東京的靖國神社。當(dāng)天是日本二戰(zhàn)投降67周年。"Notification="1"Source="/images/20.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="新聞"Grid.Row="2"Grid.Column="1"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="BurlyWood"DisplayNotification="true"Message="載有14人的香港保釣船啟豐二號成功登上釣魚島,并將五星紅旗插在釣魚島上。"Notification="9"Source="/images/21.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="環(huán)保"Grid.Row="3"Grid.Column="0"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Coral"DisplayNotification="True"Message="陳光標(biāo)和《甄嬛傳》中槿汐的扮演者孫茜將現(xiàn)場的鉛酸電池電動車砸碎,斷然拒絕鉛污染。"Notification="4"Source="/images/30.jpg"Tap="hubTile_Tap" /><toolKit:HubTile Title="電影"Grid.Row="3"Grid.Column="1"Width="218"Height="172"Margin="5,10,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Background="Chartreuse"DisplayNotification="True"Message="第69屆威尼斯電影節(jié)開幕。意大利女星瑪里尼-瓦勒麗亞走紅毯。"Notification="7"Source="/images/31.jpg"Tap="hubTile_Tap" />--><!--<Grid x:Name="ContentPanel"Grid.Row="1"Margin="12,0,12,0"><StackPanel><TextBlock Name="textBlick1" TextWrapping="Wrap" /><TextBlock Name="textBlick2" TextWrapping="Wrap" /><TextBlock Name="textBlick3" TextWrapping="Wrap" /><TextBlock Name="textBlick4" TextWrapping="Wrap" /><TextBlock Name="textBlick5" TextWrapping="Wrap" /><TextBlock Name="textBlick6" TextWrapping="Wrap" /></StackPanel><Button Height="100"VerticalAlignment="Center"Background="Blue"Content="點擊" /></Grid>--><Grid x:Name="ContentPanel"Grid.Row="1"Margin="12,0,12,0"><TextBlock Name="txtBlk"VerticalAlignment="Top"Text="" /><Button Name="btn"Width="169"Height="132"Margin="133,136,0,0"HorizontalAlignment="Left"VerticalAlignment="Top"Content="拖我啊!"ManipulationCompleted="btn_ManipulationCompleted"ManipulationDelta="btn_ManipulationDelta"ManipulationStarted="btn_ManipulationStarted"><Button.RenderTransform><TranslateTransform x:Name="translatedTransform" /></Button.RenderTransform></Button></Grid></Grid>
//private void repeaBtn_Click(object sender, RoutedEventArgs e)//{//int count = Convert.ToInt32(repeatButton.Content);//repeatButton.Content = ++count;//}/*private void chkBox_Checked(object sender, RoutedEventArgs e){if (mychkBox.IsChecked == true){MessageBox.Show("選擇");}}private void chkBox_Unchecked(object sender, RoutedEventArgs e){if (mychkBox.IsChecked == false){MessageBox.Show("未選");}}*//*private void slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e){Slider slidertemp = (Slider) sender;this.sliderText.Text = slidertemp.Value.ToString();}*//*private void Search_ActionIconTapped(object sendeer, EventArgs e){MessageBox.Show("開始搜索!");}*//*private void hubTile_Tap(object sender, System.Windows.Input.GestureEventArgs e){HubTile tile = (HubTile) sender;MessageBox.Show(tile.Message, tile.Title, MessageBoxButton.OK);}*//*private void TouchFrameReported(object sender, TouchFrameEventArgs e){//傳入null表明獲取到的觸控點信息是以屏幕左上角為原點的TouchPoint mainPoint = e.GetPrimaryTouchPoint(null);if (mainPoint != null){textBlick1.Text = "主觸控點的行為,Action: "+mainPoint.Action.ToString();textBlick2.Text = "主觸控點位置,Position: X" + mainPoint.Position.X.ToString()+"Y:"+mainPoint.Position.Y.ToString();textBlick3.Text = "主觸控點的范圍,Size.Width:"+mainPoint.Size.Width.ToString()+",Size.Height:"+mainPoint.Size.Height.ToString();textBlick4.Text = "主觸控點設(shè)置ID,TouchDevice.Id:"+mainPoint.TouchDevice.Id.ToString();textBlick5.Text = "主觸控點點中哪 個UIElement元素:" + (mainPoint.TouchDevice.DirectlyOver as FrameworkElement).Name.ToString();}TouchPointCollection points = e.GetTouchPoints(null);int i = 0;textBlick6.Text = "";if (points != null){//列舉觸控點的集合foreach (var point in points){i++;textBlick6.Text += "Position" + i + "X:" + point.Position.X.ToString() + " Y" + i + " " +point.Position.Y.ToString() + " " + point.Action.ToString() + "\n";}}}*/private void btn_ManipulationStarted(object sender, ManipulationStartedEventArgs e){txtBlk.Text = "btn_ManipulationStarted";}private void btn_ManipulationDelta(object sender, ManipulationDeltaEventArgs e){//使控件跟著觸控點走this.translatedTransform.X += e.DeltaManipulation.Translation.X;this.translatedTransform.Y += e.DeltaManipulation.Translation.Y;txtBlk.Text = "btn_ManipulationDelta"+"\n"+" Translation X:"+e.DeltaManipulation.Translation.X+" Y:"+e.DeltaManipulation.Translation.Y+"\n"+"Cumulative X:"+e.CumulativeManipulation.Translation.X+" Y:"+e.CumulativeManipulation.Translation.Y+" LinearVelocity X:"+e.Velocities.LinearVelocity.X+" Y:"+e.Velocities.LinearVelocity.Y+" IsInertial:"+e.IsInertial;}private void btn_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e){txtBlk.Text = "btn_ManipulationCompleted "+"\n"+" TotalManipulation.Translation.X:"+e.TotalManipulation.Translation.X+" Y:"+e.TotalManipulation.Translation.Y+"\n"+"FinalVelocities: X:"+e.FinalVelocities.LinearVelocity.X+" Y:"+e.FinalVelocities.LinearVelocity.Y+" IsInertial:"+e.IsInertial;}
轉(zhuǎn)載于:https://www.cnblogs.com/xiangxiaodong/archive/2013/03/16/2963433.html
總結(jié)
以上是生活随笔為你收集整理的Windows Phone UI控件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: poj 2060
- 下一篇: jQuery源码学习