This is a migrated thread and some comments may be shown as answers.

Hide part of the RadMediaItem with a Border control

1 Answer 44 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 06 Jan 2011, 12:48 AM
Hello,

I have a problem with some of the displayed wmv videos. I need to hide the bottom of every RadMediaItem with a TextBlock within a Border control (White back-color) Please view the attached image 1.jpg.

I used the following code. It is works fine but it hide the radmediaitem's buttons (like play, pause, full screen and so on). View the attached image 2.jpg
<UserControl x:Class="MediaPlayerSmoothStreaming.MainPage"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"         
    mc:Ignorable="d" Loaded="UserControl_Loaded"
    d:DesignHeight="300" d:DesignWidth="400">
  
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadMediaPlayer x:Name="player" >
            <telerik:RadMediaItem IsStreamingSource="False" x:Name="item0" 
                                  StreamAttached="RadMediaItem_StreamAttached" >
            </telerik:RadMediaItem>
        </telerik:RadMediaPlayer>
  
        <Border CornerRadius="2" Background="#FFFFFF" Height="25" VerticalAlignment="Bottom" >
            <TextBlock x:Name="item1" Text="Nasreen" Foreground="#FF145178" Margin="2"></TextBlock>
        </Border>
    </Grid>
</UserControl>

Please, I need your help in order to achieve the target without hiding the  radmediaitem's buttons as I explained above.
It is apprecited to send me the modified code.

Regards,
Bader

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 07 Jan 2011, 09:59 AM
Hello Bader,

In order to achieve this look you should modify the style of MediaPlayer. The easiest way is to use blend and edit the control template of the RadMediaPlayerWrapper control. Inside you can find the components for video controls panel and other visual elements. You could put your border under the elements you want and hide the bottom part of the movie. You can take a look at following article about restyling: http://www.telerik.com/help/silverlight/common-styling-appearance-edit-control-templates-blend.html

Best wishes,
Hristo
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
MediaPlayer
Asked by
Bader
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or