提交 1680ff86 编写于 作者: R Rafael Rosa

chore: fix for Height

上级 bc55d55a
......@@ -768,18 +768,21 @@ namespace Windows.UI.Xaml.Controls
_mediaPlayer is { } &&
XamlRoot?.Content is UIElement root)
{
var marginBottom = XamlRoot.Size.Height - m_tpControlPanelGrid.LayoutSlot.Height - m_tpControlPanelGrid.RelativePosition.Y;
var bounds = new Rect(
0,
0,
m_tpControlPanelGrid.ActualWidth,
_isShowingControls ? m_tpControlPanelGrid.ActualHeight + (marginBottom > 0 ? marginBottom : 0) : 0
);
var transportBounds = TransformToVisual(root).TransformBounds(bounds);
_mediaPlayer.SetTransportControlBounds(transportBounds);
var slot = m_tpControlPanelGrid
.TransformToVisual(m_tpControlPanelGrid.Parent as UIElement)
.TransformBounds(m_tpControlPanelGrid.LayoutSlotWithMarginsAndAlignments);
slot.Height += m_tpControlPanelGrid.Padding.Top
+ m_tpControlPanelGrid.Padding.Bottom
+ Margin.Top
+ Margin.Bottom;
if (!_isShowingControls)
{
slot.Height = 0;
}
_mediaPlayer.SetTransportControlBounds(slot);
}
}
private void OnPaneGridTapped(object sender, TappedRoutedEventArgs e)
{
if (ShowAndHideAutomatically)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册