Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Please Help me "'ContentPanel' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'.""

Please Help me "'ContentPanel' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'.""

Scheduled Pinned Locked Moved WCF and WF
csshelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wasimsharp
    wrote on last edited by
    #1

    I Create the Style For TabControl When i give this style to any TabControl it gives Exception when i build Project ""'ContentPanel' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'."" Please please help me.

    <Style x:Key="MedicalTabControlStyle" TargetType="{x:Type TabControl}">

            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type TabControl}">
    				<ControlTemplate.Resources>
    						<Storyboard x:Key="OnSelectionChanged1">
    						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)\[3\].(TranslateTransform.X)">
    							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    							<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
    						</DoubleAnimationUsingKeyFrames>
    						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)\[0\].(ScaleTransform.ScaleX)">
    							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    							<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
    						</DoubleAnimationUsingKeyFrames>
    					</Storyboard>
    					</ControlTemplate.Resources>
                        <Grid x:Name="MainGrid" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local" Background="{x:Null}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Name="ColumnDefinition0"  Width="Auto" MinWidth="65"/>
                                <ColumnDefinition x:Name="ColumnDefinition1" Width="\*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
                                <RowDefinition x:Name="RowDefinition1" Height="\*"/>
                            </Grid.RowDefinitions>
    					    <Grid x:Name="GrdMain" Margin="0,5" ClipToBounds="False" Panel.ZIndex="-1">
                        		<Border  Margin="0" MinWidth="100" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Stretch" CornerRadius="3" Padding="1,1,1,2" ClipToBounds="True" BorderThickness="1,1,1,3" BorderBrush="#FF
    
    V 1 Reply Last reply
    0
    • W wasimsharp

      I Create the Style For TabControl When i give this style to any TabControl it gives Exception when i build Project ""'ContentPanel' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'."" Please please help me.

      <Style x:Key="MedicalTabControlStyle" TargetType="{x:Type TabControl}">

              <Setter Property="Template">
                  <Setter.Value>
                      <ControlTemplate TargetType="{x:Type TabControl}">
      				<ControlTemplate.Resources>
      						<Storyboard x:Key="OnSelectionChanged1">
      						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)\[3\].(TranslateTransform.X)">
      							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
      						</DoubleAnimationUsingKeyFrames>
      						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ContentPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)\[0\].(ScaleTransform.ScaleX)">
      							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
      						</DoubleAnimationUsingKeyFrames>
      					</Storyboard>
      					</ControlTemplate.Resources>
                          <Grid x:Name="MainGrid" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local" Background="{x:Null}">
                              <Grid.ColumnDefinitions>
                                  <ColumnDefinition x:Name="ColumnDefinition0"  Width="Auto" MinWidth="65"/>
                                  <ColumnDefinition x:Name="ColumnDefinition1" Width="\*" />
                              </Grid.ColumnDefinitions>
                              <Grid.RowDefinitions>
                                  <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
                                  <RowDefinition x:Name="RowDefinition1" Height="\*"/>
                              </Grid.RowDefinitions>
      					    <Grid x:Name="GrdMain" Margin="0,5" ClipToBounds="False" Panel.ZIndex="-1">
                          		<Border  Margin="0" MinWidth="100" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Stretch" CornerRadius="3" Padding="1,1,1,2" ClipToBounds="True" BorderThickness="1,1,1,3" BorderBrush="#FF
      
      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      I tried using your style. I am able to build it and I used the style with a TabControl also. Check error messages in the Output window rather than Error window.

      Castle Rider

      What if I freeze??? Don't forget to breath...

      My: Website | Yahoo Group | Blog Spot

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups