Example #1
0
 /// <summary>
 /// Re-size the ListView's Panel when the SplitView is compact so the items
 /// will fit within the visible space and correctly display a keyboard focus rect.
 /// </summary>
 private void OnPaneToggled()
 {
     if (splitView.IsPaneOpen)
     {
         ItemsPanelRoot.ClearValue(WidthProperty);
         ItemsPanelRoot.ClearValue(HorizontalAlignmentProperty);
     }
     else if (splitView.DisplayMode == SplitViewDisplayMode.CompactInline || splitView.DisplayMode == SplitViewDisplayMode.CompactOverlay)
     {
         ItemsPanelRoot.SetValue(WidthProperty, splitView.CompactPaneLength);
         ItemsPanelRoot.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
     }
 }
Example #2
0
 /// <summary>
 /// Re-size the ListView's Panel when the SplitView is compact so the items
 /// will fit within the visible space and correctly display a keyboard focus rect.
 /// </summary>
 private void OnPaneToggled()
 {
     if (_splitViewHost.IsPaneOpen)
     {
         ItemsPanelRoot.ClearValue(FrameworkElement.WidthProperty);
         ItemsPanelRoot.ClearValue(FrameworkElement.HorizontalAlignmentProperty);
     }
     else if (this._splitViewHost.DisplayMode == SplitViewDisplayMode.CompactInline ||
              this._splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay)
     {
         ItemsPanelRoot.SetValue(FrameworkElement.WidthProperty, this._splitViewHost.CompactPaneLength);
         ItemsPanelRoot.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Left);
     }
 }