0

I'm designing a xaml page, if I do not insert toolkit:TiltEffect.IsTiltEnabled="True" my page has an "invalid XAML". Here's the complete page:

<phone:PhoneApplicationPage 
    x:Class="SolLongListSelector_WinPhone8.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"

    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--ContentPanel - place additional content here-->


        <!-- Slide Show with Pivot Control -->
        <controls:Pivot
                Grid.Row="0" 
                Grid.Column="0"
                Name="slide_show" 
                Margin="0,-100,0,0"
                SelectionChanged="slide_show_SelectionChanged">

            <!-- Pivot item template -->
            <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <Image  Name="img" 
                            CacheMode="BitmapCache" 
                            Source="{Binding image}" 
                            HorizontalAlignment="Stretch" 
                            VerticalAlignment="Stretch" 
                            Stretch="Uniform" 
                            toolkit:TiltEffect.IsTiltEnabled="True"
                             />
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>


    </Grid>
</phone:PhoneApplicationPage>

I want to take off the TiltEffect.IsTiltEnabled but I can't! Also keeping it gives me an error: Error 10 The name "TiltEffect" does not exist in the namespace "clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit".

Any ideas? Thanks

1

2 Answers 2

1

Make sure you have the Windows Phone Toolkit installed. The TiltEffect is not a part of the Windows Phone SDK. This is most likely why you are getting those errors.

0

Go to View->Other Windows->Package Manager Console , type the following command and hit enter.

Install-Package WPtoolkit

It installs the updated Windows Phone Toolkit and it works fine.

2
  • Already installed! PM> Install-Package WPtoolkit 'WPtoolkit 4.2013.08.16' already installed. SolLongListSelector_WinPhone8 already has a reference to 'WPtoolkit 4.2013.08.16'. Sep 23, 2014 at 15:49
  • IF that's not working for, I can give you alternate solution. Just add this TileEffect.cs in this link github.com/BalasubramaniM/HelperClass/blob/master/TiltEffect.cs , change the namespace with your project name and build the project. Add reference, xmlns:local="clr-namespace:[Namespace]" and use the control as, local:TiltEffect.IsTiltEnabled="True". Hope it helps you. Sep 24, 2014 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.