on 03-07-2012 07:27 PM
Hi,
Someone know a way to recreate a event that execute something when the user change page in pagepanel? Thanks in advance
on 06-07-2012 05:55 PM
Hi,
Thank you for your question. There is no delegate method in a PagePanel that you can use to know when the page has changed. To check if a PagePanel has changed pages, you could use the following snippet of code.
FlickGestureDetector gest = new FlickGestureDetector();
gest.Direction = FlickDirection.Horizontal;
gest.FlickDetected += delegate(object sender, FlickEventArgs e) {
if(pagePanel.CurrentPageIndex != oldPageIndex)
{
Console.WriteLine("Looking at a new page");
oldPageIndex = pagePanel.CurrentPageIndex;
}
};
pagePanel.AddGestureDetector(gest);I hope this helps you out.
James
on 06-07-2012 06:18 PM
Thanks for your solution jamesnorman91, but I had already solved it by using a timer
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval=100;
timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
timer.Start();
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if (PagePanel_1.CurrentPageIndex != old_page)
{
current_page=PagePanel_1.CurrentPageIndex;
Console.WriteLine("Page changed");
old_page = current_page
}
}
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870