Skip to main content

Microsoft Silverlight

Answered Question Want to Put NEXT & BACK Link to Application for go other page.RSS Feed

(0)

viral0028
viral0028

Member

Member

23 points

161 Posts

Want to Put NEXT & BACK Link to Application for go other page.

 Hi,,,

 

 I hv one page.. In this page i put 5 different Grid. with different content. now i want to Put NEXT & BACK button to Uper part  this 5 grid.

if user click on Next page this Will show Next grid of current Grid. & vice vice versa for back..

 

How do i get Starts..

Please give me suggestion.

( if possible then i wnat use only One NEXT & BACK button)

 

Thx In Advance.

rabbott
rabbott

Member

Member

258 points

37 Posts

Answered Question

Re: Want to Put NEXT & BACK Link to Application for go other page.

Hi, assuming your buttons are called buttonNext and buttonBack, and your grids are named grid1 through grid5:

private int gridIndex = 0;

private void buttonBack_Click(object sender, RoutedEventArgs e)
{
gridIndex--;
if (gridIndex < 0)
gridIndex = 4;
ShowGrids();
}

private void buttonNext_Click(object sender, RoutedEventArgs e)
{
gridIndex++;
if (gridIndex > 4)
gridIndex = 0;
ShowGrids();
}

private void
ShowGrids()
{
grid1.Visibility = (gridIndex == 0 ? Visibility.Visible : Visibility.Collapsed);
grid2.Visibility = (gridIndex == 1 ? Visibility.Visible : Visibility.Collapsed);
grid3.Visibility = (gridIndex == 2 ? Visibility.Visible : Visibility.Collapsed);
grid4.Visibility = (gridIndex == 3 ? Visibility.Visible : Visibility.Collapsed);
grid5.Visibility = (gridIndex == 4 ? Visibility.Visible : Visibility.Collapsed);
}

Regards,
Rob

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

3375 points

377 Posts

Re: Want to Put NEXT & BACK Link to Application for go other page.

Hi,

   Rabbott could achieve what you want. And you may also do it use the navigation feature.

   The whole ideal is like this:

   Create a mainpage and nest a frame inside it.

   Then create five Page(each contains a grid). Then you can navigate throught.

Best Regards

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities