Update:
Solved the problem by inserting a grid with two rows in FlipView control. Than added media element spanning two rows and buttons in second row in another grid. Similar to this,
<FlipView>
<Grid PointerEntered ="PointerEntered_Event">
<MediaElement ...../>
<Button />
</Grid>
</FlipView>
Then in the code behind,
private void PointerEntered_Event(object sender, PointerRoutedEventArgs e)
{
var temp = sender as grid;
temp.children[1].Visibility = Visibility.Visible;
}
/////////////Update End//////////////////////
I am trying to add a button in flipview which has multiple sample videos. The button should show during mouse hover event. But I could not find any way to show the button during mouse hover event. Is this even possible?
I am trying to add a button in flipview which has multiple sample videos. The button should show during mouse hover event. But I could not find any way to show the button during mouse hover event. Is this even possible?
I have tried to capture mouse hover event than create a button but that failed. This is my flipview implementation,
<FlipView x:Name="SampleFlipView" CornerRadius="10"
Margin="0,5,0,0"
Width="100"
Height="200"
ItemsSource="{x:Bind ViewModel.SampleItems, Mode=OneWay}">
<FlipView.ItemTemplate>
<DataTemplate x:DataType="data:SampleItem">
<MediaElement Source ="{x:Bind ItemSource}" AutoPlay="True" IsLooping="True"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
It is recommended to use PointerEntered event to handle mouse hover and use Visibility to show and hide button.
Update
I noticed your new question and understood your scenario, here is my complete test code. Use VisualTreeHelper to find the button in the Grid.