Click here to Skip to main content
15,884,838 members
Articles / Desktop Programming / WPF

(Hybrid Smart Client) RSS Media Player

Rate me:
Please Sign up or sign in to vote.
3.92/5 (8 votes)
9 Mar 2009CPOL4 min read 68.6K   1K   17  
A WPF application for viewing RSS video feeds. Built using the MVVM pattern.
<Window x:Name="mainwnd" x:Class="RSSVideoPlayer.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:RSSVideoPlayer"
    xmlns:UC="clr-namespace:RSSVideoPlayer.MediaElementControl"
    Title="WPF Media Player"  Height="457" Width="603">
    <Window.Resources>
        <ResourceDictionary Source="MainWindowResources.xaml"/>
    </Window.Resources>
        <Window.Background>
        <RadialGradientBrush>
            <GradientStop x:Name="Offset1" Offset="0" Color="Black"/>
            <GradientStop x:Name="Offset2" Offset="2" Color="Gray"/>
        </RadialGradientBrush>
    </Window.Background>
    <Grid>
        <DockPanel Name="dockPanel1" >
           <Menu DockPanel.Dock="Top" Height="20" Margin="0,0,0,5">
                <Menu.Background>
                    <LinearGradientBrush>
                        <GradientStop Offset="1" Color="Black"/>
                        <GradientStop Offset="0" Color="LightGray"/>
                    </LinearGradientBrush>
                </Menu.Background>
                <MenuItem Header="Exit" Command="{Binding cmdExit}"/>
               <MenuItem Header="Settings"/>
                <MenuItem Header="Windows">
                    <MenuItem Header="Library" Command="{Binding cmdLibrary}"></MenuItem>
                    <MenuItem Header="Video RSS" Command="{Binding cmdRSS}"></MenuItem>
                </MenuItem>
            </Menu>
           
            <Expander  IsExpanded="{Binding Expanded}"  DockPanel.Dock="Bottom" ExpandDirection="Up" Header="Media" Background="Black" Foreground="White">
                <DockPanel>
                    <TabControl  
              IsSynchronizedWithCurrentItem="True" 
              ItemsSource="{Binding Tabs}" 
              TabStripPlacement="Top" 
              ItemTemplate="{StaticResource ClosableTabItemTemplate}"
              Margin="4"
             >
                        <TabControl.Background>
                            <LinearGradientBrush>
                                <GradientStop Offset="2" Color="Black"/>
                                <GradientStop Offset="0" Color="LightGray"/>
                            </LinearGradientBrush>
                        </TabControl.Background>
                    </TabControl>
                </DockPanel>
            </Expander>
            <UC:MyMediaControl MyMediaSource="{Binding ElementName=mainwnd,Path=DataContext.Source}"></UC:MyMediaControl>
        </DockPanel>
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Anytime Fitness
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions