This is a migrated thread and some comments may be shown as answers.

The tag 'Type' does not exist in XML namespace 'clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation'. Line 13 Position 20.

13 Answers 682 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
hkdave95
Top achievements
Rank 2
hkdave95 asked on 28 Jul 2008, 11:10 PM
Hi

I am getting the above error trying to implement one of your WPF examples.

Please can you tell me where I am going wrong.

I am trying to implement a simple Carousel.

Muy code is ...
<Window x:Class="frmMain" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="dareSOFT OST2PST Conversion Utility" Height="300" Width="402" MinWidth="402" MinHeight="300" xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">  
    <Grid> 
        <my:RadCarousel Name="rcMenu" AutoGenerateDataPresenters="True" HorizontalAlignment="Stretch" Cursor="Arrow">  
            <my:RadCarousel.BitmapEffectInput> 
                <BitmapEffectInput /> 
            </my:RadCarousel.BitmapEffectInput> 
            <my:RadCarousel.BitmapEffect> 
                <BlurBitmapEffect /> 
            </my:RadCarousel.BitmapEffect> 
            <Style TargetType="{my:Type telerik:CarouselDataRecordPresenter}">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{my:Type telerik:CarouselDataRecordPresenter}">  
                            <Grid IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="30" /> 
                                    <RowDefinition Height="100" /> 
                                    <RowDefinition Height="Auto" /> 
                                </Grid.RowDefinitions> 
                                <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" > 
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                                <Rectangle Grid.Row="1" RadiusX="3" RadiusY="3" Width="110" Height="80">  
                                    <Rectangle.Fill> 
                                        <ImageBrush x:Name="brush" ImageSource="{Binding Path=Fields[Picture].Value}"/>  
                                    </Rectangle.Fill> 
                                </Rectangle> 
                                <StackPanel Grid.Row="2"  Orientation="Horizontal" VerticalAlignment="Center">  
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </my:RadCarousel> 
    </Grid> 
</Window> 
 

Kind Regards

David

13 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 29 Jul 2008, 01:44 PM
Hello hkdave95,

The only change that you have to make to fix this problem is to use "x:Type" instead of "my:Type". This is needed as the so called Type markup extension is defined in the "http://schemas.microsoft.com/winfx/2006/xaml" namespace and when you use "my:Type" the compiler searches for this extension in the wrong place.

Hope this helps.

Regards,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
hkdave95
Top achievements
Rank 2
answered on 30 Jul 2008, 06:20 AM
Hi

I have now replaced "my" with "x".

I now get the error: Could not create an instance of type 'TypeExtension'.

This occurrs on line ...
ObjectType="{x:Type e:dareSOFT_OST2PSTDataSet}" 

If I remove this line then the error occurs on this line ...
            <Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">  
 

My entire code at present looks like ...
<Window x:Class="frmMain" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="dareSOFT OST2PST Conversion Utility" Height="300" Width="402" MinWidth="402" MinHeight="300" xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">  
    <Grid> 
        <Grid.Resources> 
            <ObjectDataProvider x:Key="objectDataProvider" ObjectType="{x:Type e:dareSOFT_OST2PSTDataSet}" MethodName="GetCustomersView" /> 
        </Grid.Resources> 
        <my:RadCarousel Name="rcMenu" AutoGenerateDataPresenters="True" HorizontalAlignment="Stretch" Cursor="Arrow" ItemsSource="{Binding Source={StaticResource objectDataProvider}}">  
            <my:RadCarousel.BitmapEffectInput> 
                <BitmapEffectInput /> 
            </my:RadCarousel.BitmapEffectInput> 
            <my:RadCarousel.BitmapEffect> 
                <BlurBitmapEffect /> 
            </my:RadCarousel.BitmapEffect> 
            <Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">  
                <Setter Property="Template">  
                    <Setter.Value> 
                        <ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">  
                            <Grid IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="30" /> 
                                    <RowDefinition Height="100" /> 
                                    <RowDefinition Height="Auto" /> 
                                </Grid.RowDefinitions> 
                                <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" > 
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                                <Rectangle Grid.Row="1" RadiusX="3" RadiusY="3" Width="110" Height="80">  
                                    <Rectangle.Fill> 
                                        <ImageBrush x:Name="brush" ImageSource="{Binding Path=Fields[Picture].Value}"/>  
                                    </Rectangle.Fill> 
                                </Rectangle> 
                                <StackPanel Grid.Row="2"  Orientation="Horizontal" VerticalAlignment="Center">  
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>  
                                </StackPanel> 
                            </Grid> 
                        </ControlTemplate> 
                    </Setter.Value> 
                </Setter> 
            </Style> 
        </my:RadCarousel> 
    </Grid> 
</Window> 
 

Any ideas

Kind Regards

David
0
Milan
Telerik team
answered on 30 Jul 2008, 01:06 PM
Hello hkdave95,

I have created a sample project that will get you started on creating custom styles for the CarouselDataRecordPresenter. Here I will briefly mention the solutions to the compilation problems that you are having. First the "e" namespace mapping is not defined and when you try to set the ObjectType property of your objectDataProvider to "{x:Type e:dareSOFT_OST2PSTDataSet}" the "dareSOFT_OST2PSTDataSet" cannot be located. The last change that you need to do is to move your style definition to the "Grid.Resources" section.
Feel free to check out the sample project where you can find a detailed explanation.

Best wishes,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Vandana
Top achievements
Rank 1
answered on 18 Feb 2009, 12:33 PM
Hi,
I have created same WPF Browser Application, In that I have used the same code given in your example. Changed the namespace. added DataClass.cs and sky.png.
but when i run this application I could see only blank items moving in carousel. Can someone tell me where i did mistake?

my code in xaml is
<Page x:Class="tryWpf2.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:e="clr-namespace:tryWpf2"  
    Title="Page1">
    <Grid>
        <Grid.Resources>
            
            <ObjectDataProvider x:Key="objectDataProvider" ObjectType="{x:Type e:DataClass}" MethodName="GetSampleData"/>

            
            <Style TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type telerik:CarouselDataRecordPresenter}">
                            <Grid IsHitTestVisible="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30" />
                                    <RowDefinition Height="100" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" >
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>
                                </StackPanel>
                                <Rectangle Grid.Row="1" RadiusX="3" RadiusY="3" Width="110" Height="80">
                                    <Rectangle.Fill>
                                        <ImageBrush x:Name="brush" ImageSource="{Binding Path=Fields[Picture].Value}"/>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <StackPanel Grid.Row="2"  Orientation="Horizontal" VerticalAlignment="Center">
            
                                    <Label Content="{Binding Path=Fields[Text].Value}" FontSize="12" Foreground="#ff8FB3FF"/>
                                </StackPanel>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

        </Grid.Resources>
        
        <telerik:RadCarousel Name="radCarousel1" ItemsSource="{Binding}" DataContext="{StaticResource objectDataProvider}" />

    </Grid>
</Page>


Regards
Vandana
0
Milan
Telerik team
answered on 19 Feb 2009, 04:08 PM
Hi Vandana,

The only thing that comes to my mind is to check the properties of sky.png. Its build actuion should be none and its copy to output should be set to always.
If that does not help could you please send us your applications so we can check it ourselves.

Sincerely yours,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vandana
Top achievements
Rank 1
answered on 20 Feb 2009, 10:01 AM
Hello.

As per your suggestions I have set properties of sky.png. Its build action to none and its copy to output set to always.
Still It is showing blank CarouselItems. One more question is if the problem is with image it should at least show the data other than image ie two text that i am showing in Carousel Item.
When I run your sample project it runs successfully. but same code when I run in some trial application, It shows nothing. then what I am missing here

Also I am not able to upload my application. can you tell me how can I upload zip file to the forum?

Thanx and Regards
Vandana
0
Vlad
Telerik team
answered on 20 Feb 2009, 11:08 AM
Hello Vandana,

Attachments in forums are not permitted - you can submit support ticket.

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Vandana
Top achievements
Rank 1
answered on 20 Feb 2009, 11:31 AM
Hello

And from where I can submit support ticket?

Regards
Vandana
0
Hristo Deshev
Telerik team
answered on 23 Feb 2009, 04:32 PM
Hi Vandana,

To open a support ticket, go to the Support page, scroll to the bottom of the page and click the "Send a support" ticket link.

Kind regards,
Hristo Deshev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David
Top achievements
Rank 2
answered on 02 Jun 2009, 06:02 PM
I have a strange error with your example.  If I run it with the solution it runs fine.  If I take the files and add them to my current project the application runs but no data is displayed in the Carousel.  The output pane shows the following binding error:

System.Windows.Data Error: 39 : BindingExpression path error: 'Fields' property not found on 'object' ''DataRecord' (HashCode=22895473)'. BindingExpression:Path=Fields[Text].Value; DataItem='DataRecord' (HashCode=22895473); target element is 'Label' (Name=''); target property is 'Content' (type 'Object')

System.Windows.Data Error: 39 : BindingExpression path error: 'Fields' property not found on 'object' ''DataRecord' (HashCode=38368963)'. BindingExpression:Path=Fields[Text].Value; DataItem='DataRecord' (HashCode=38368963); target element is 'Label' (Name=''); target property is 'Content' (type 'Object')

System.Windows.Data Error: 39 : BindingExpression path error: 'Fields' property not found on 'object' ''DataRecord' (HashCode=38368963)'. BindingExpression:Path=Fields[Text].Value; DataItem='DataRecord' (HashCode=38368963); target element is 'Label' (Name=''); target property is 'Content' (type 'Object')


Tried changing the BindingPath to Data[Text] and just Text but no luck.  Checked references and they match your project.
0
Milan
Telerik team
answered on 03 Jun 2009, 01:56 PM
Hello David,

Well, the binding expression error suggests that there is a binding that targets the Fields property of the DataRecord class. The Fields property has been deprecated and removed a long time ago. If you have updated to a newer version of our controls you should reconfigure your bindings.
For example, {Binding Path=Fields[FirstName]} should become  {Binding Path=Data.FirstName}.

If that doesn't help could you be more specific about the example that you are refering to?
Could you paste the XAML code that is causing you problems so that we can fix the problem more easily?

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
David
Top achievements
Rank 2
answered on 03 Jun 2009, 02:08 PM
That fixed the problem.  The example is the one in this thread (about 7 replies up).  It is called CarouselDataRecordPresenterCustomStyle.zip, it was posted by you :) last year.

Thanks,
David
0
Milan
Telerik team
answered on 03 Jun 2009, 02:17 PM
Hi David,

I am glad that the problem is now resolved.

Sincerely yours,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Carousel
Asked by
hkdave95
Top achievements
Rank 2
Answers by
Milan
Telerik team
hkdave95
Top achievements
Rank 2
Vandana
Top achievements
Rank 1
Vlad
Telerik team
Hristo Deshev
Telerik team
David
Top achievements
Rank 2
Share this question
or