0

I'm developing an application in that,Flipview control it is having two flipview itemtemplates on selection changed(flipview) i need to get the selected index of the flipview is that possible.Which i have tried like this

private void _fvDashboard_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        int index=_fvDashboard.SelectedIndex;
        if (index != -1)
        {
            if (_fvDashboard.SelectedIndex == 1)
            {
                btnScrBoard.Background = new SolidColorBrush(ColorHelper.FromArgb(255, 54, 54, 54));
                btnItem2.Foreground = new SolidColorBrush(ColorHelper.FromArgb(255, 255, 255, 255));

                btnItem1.Background = new SolidColorBrush(ColorHelper.FromArgb(255, 210, 222, 235));
                btnItem1.Foreground = new SolidColorBrush(ColorHelper.FromArgb(255, 0, 0, 0));

                _fvDashboard.SelectedIndex = 1;
            }
            else
            {
                btnItem1.Background = new SolidColorBrush(ColorHelper.FromArgb(255, 54, 54, 54));
                btnItem1.Foreground = new SolidColorBrush(ColorHelper.FromArgb(255, 255, 255, 255));

                btnItem2.Background = new SolidColorBrush(ColorHelper.FromArgb(255, 210, 222, 235));
                btnItem2.Foreground = new SolidColorBrush(ColorHelper.FromArgb(255, 0, 0, 0));

                _fvDashboard.SelectedIndex = 0;
            }
        }
    }
Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
Dinesh Haraveer
  • 1,784
  • 3
  • 31
  • 54
  • @JerryNixon-MSFT i just need the index number when the flipview control changed but not getting the controls name or something inside the flipview itemcontainer.Is it possible or not that the thing i need. – Dinesh Haraveer May 09 '13 at 03:56
  • The SelectedIndex property will give you the index of the currently selected. If you keep reference to it, SelectedIndex will also give you the index of the previously selected. I hope that's what you want. – Jerry Nixon May 09 '13 at 14:25

0 Answers0