Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

(Hybrid Smart Client) RSS Media Player

, 9 Mar 2009 CPOL
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)

Share

About the Author

Paul_Wade
Software Developer (Senior) Anytime Fitness
United States United States
No Biography provided
Follow on   Twitter

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 9 Mar 2009
Article Copyright 2009 by Paul_Wade
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid