Getting Error in Windows 8.1 XAML code when using Microsoft.PlayerFramework

Topics: Windows 8 Xaml
Apr 1, 2015 at 5:15 AM
Edited Apr 1, 2015 at 5:17 AM
Error Is:

The specified value cannot be assigned to the collection. the following type was expected UIelement
xmlns:player="using:Microsoft.PlayerFramework"

<Border x:Name="Border" DataContext="{TemplateBinding ViewModel}">
                                <Border.Resources>
                                    <player:BoolToVisibilityConverter x:Key="VisibleIfConverter" />
                                </Border.Resources>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>

                                    <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center">
                                            <StackPanel Orientation="Horizontal" x:Name="NonEssentialsNearLeft">
                                                                                                
                                                <player:SkipPreviousButtonBehavior x:Name="SkipPreviousButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipPreviousButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Size="70" FontSize="40" Margin="10,0,10,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                                <player:RewindButton x:Name="RewindButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsRewindButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Size="70" FontSize="40" Margin="10,0,10,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                                <player:SkipBackButton x:Name="SkipBackButton" ViewModel="{TemplateBinding ViewModel}" Visibility="Collapsed" Size="70" FontSize="40" Margin="10,0,10,0" Padding="0,-10,0,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                            </StackPanel>
                                            <player:PlayPauseButton x:Name="PlayPauseButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsPlayPauseButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Size="140" FontSize="80" Margin="25,0,25,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                            <StackPanel Orientation="Horizontal" x:Name="NonEssentialsNearRight">
                                            <player:SkipAheadButton x:Name="SkipAheadButton" ViewModel="{TemplateBinding ViewModel}" Visibility="Collapsed" Size="70" FontSize="40" Margin="10,0,10,0" Padding="0,-10,0,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                            <player:FastForwardButton x:Name="FastForwardButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsFastForwardButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Size="70" FontSize="40" Margin="10,0,10,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                            <player:SkipNextButton x:Name="SkipNextButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipNextButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Size="70" FontSize="40" Margin="10,0,10,0" StrokeThickness="0" Background="{StaticResource ItemBackgroundThemeBrush}"/>
                                        </StackPanel>
                                    </StackPanel>
                                    <Grid x:Name="TimelineContainerGrid" Grid.Row="1"  Height="60" HorizontalAlignment="Left">

                                        <Grid x:Name="TimelineContainer"  Background="{StaticResource ItemBackgroundThemeBrush}">
                                            <Grid Margin="30,4,30,7">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                    <ColumnDefinition Width="Auto"/>
                                                </Grid.ColumnDefinitions>
                                                <player:TimeElapsedButton x:Name="TimeElapsedButton" Grid.Column="0" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimeElapsedButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>

                                                <player:Timeline Height="5" Padding="0,10,0,10" x:Name="Timeline" Grid.Column="1" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimelineVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0">
                                                    <player:Timeline.SliderStyle>
                                                        <Style TargetType="player:SeekableSlider">
                                                            <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
                                                            <Setter Property="SliderTrackDecreasePressedBackground" Value="{StaticResource ButtonPressedForegroundThemeBrush}" />
                                                            <Setter Property="SliderTrackDecreasePointerOverBackground" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}" />
                                                            <Setter Property="SliderThumbStyle">
                                                                <Setter.Value>
                                                                    <Style TargetType="Thumb">
                                                                        <Setter Property="Template">
                                                                            <Setter.Value>
                                                                                <ControlTemplate TargetType="Thumb">
                                                                                    <Canvas HorizontalAlignment="Center" VerticalAlignment="Top" Margin="-18,-38,18,0">
                                                                                        <Grid>
                                                                                            <Ellipse Stroke="{StaticResource ButtonForegroundThemeBrush}" Fill="{StaticResource ButtonPressedForegroundThemeBrush}" StrokeThickness="2" Width="35" Height="35"/>
                                                                                            <Path Fill="{StaticResource ButtonForegroundThemeBrush}" Margin="0,0,0,-7" VerticalAlignment="Bottom" HorizontalAlignment="Center" Data="M 0,0 8,0 4,8Z"/>
                                                                                        </Grid>
                                                                                    </Canvas>
                                                                                </ControlTemplate>
                                                                            </Setter.Value>
                                                                        </Setter>
                                                                    </Style>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </player:Timeline.SliderStyle>
                                                </player:Timeline>
                                                    
                                                <player:TimeRemainingButton x:Name="TimeRemainingButton" Grid.Column="2" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimeRemainingButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                                <player:DurationButton x:Name="DurationButton" Grid.Column="2" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsDurationButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                            </Grid>
                                        </Grid>
                                    </Grid>
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            </Style>
Iam Getting the above mentioned error at the Bolded parts of the code. How to Resolve this Error, Help me.