locked
Reorder items in a ListView in a SettingsFlyout causes items to hide behind the SettingsFlyout RRS feed

  • Question

  • I have a SettingsFlyout with a ListView with TextBlocks and when I try to reorder a TextBlock, the TextBlock dissapears behind the SettingsFlyout. When I move the TextBlock to the left, the TextBlock appears as soon as it moves from under the SettingsFlyOut.

    I tried to give the TextBlocks a higher z-index, but that doesn't solve the problem.

    Is this a bug? And can it be solved with a workaround?

    Edit:

    I found a workaround:

    In the listview event DragItemStarting I make a grid with a white background on the underlying page visible and set the SettingsFlyout background transparent.

    In the SettingsFlyout event 'LostFocus' I hide the white grid in the background and set the SettingsFlyout background back to white.

    private void lstvwOrder_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
    		{
    			Frame RootFRame = Window.Current.Content as Frame;
    			Page PageRoot = RootFRame.Content as Page;
    			Grid GridMain = PageRoot.FindName("GridMain") as Grid;
    			Grid grdSettingsBackground = PageRoot.FindName("grdSettingsBackground") as Grid;
    			grdSettingsBackground.Visibility = Visibility.Visible;
    			flyoutPreferences.Background = new SolidColorBrush(Colors.Transparent);
    		}
    
    private void flyoutPreferences_LostFocus(object sender, RoutedEventArgs e)
    		{
    			Frame RootFRame = Window.Current.Content as Frame;
    			Page PageRoot = RootFRame.Content as Page;
    			Grid GridMain = PageRoot.FindName("GridMain") as Grid;
    			Grid grdSettingsBackground = PageRoot.FindName("grdSettingsBackground") as Grid;
    			flyoutPreferences.Background = new SolidColorBrush(Colors.White);
    			grdSettingsBackground.Visibility = Visibility.Collapsed;
    		} 


    The 'GridMain' is the first grid on every page and 'grdSettingsFlyout' is the grid with the same dimensions as the SettingsFlyout and with a white background color.

    • Edited by DennisBakker71 Saturday, May 24, 2014 8:41 PM Solved with a workaround...
    Saturday, May 24, 2014 3:35 PM

Answers

  • Hi Dennis,

    Good to know you have a solution. :)

    I will close this question, and any further questions are welcome.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, May 26, 2014 6:54 AM
    Moderator