Hide part of the RadMediaItem with a Border control

2 posts, 0 answers
  1. Bader
    Bader avatar
    215 posts
    Member since:
    Aug 2008

    Posted 05 Jan 2011 Link to this post

    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
  2. Hristo
    Admin
    Hristo avatar
    352 posts

    Posted 07 Jan 2011 Link to this post

    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
  3. DevCraft banner
Back to Top