Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:10:32+00:00 2026-05-29T08:10:32+00:00

I Have a custom TabControl with a custom DependencyProperty named SelectionChanging. Well, I want

  • 0

I Have a custom TabControl with a custom DependencyProperty named SelectionChanging. Well, I want to access the TabItem to animate it, but I don’t know how to access it. This code throws an Exception saying that can’t find “tabItem”

How can I reference this element “tabItem” from the EventTrigger?

<DataTemplate x:Key="WorkSpaceTemplate">
    <aero:SystemDropShadowChrome>
        <controls:PinardTabControl IsSynchronizedWithCurrentItem="True"
                    Margin="0"
                    Padding="0"
                    BorderThickness="2"
                    BorderBrush="{StaticResource WorkspaceBorderBrush}"
                    Background="{StaticResource WorkspaceBackgroundBrush}"
                    ItemsSource="{Binding}" SnapsToDevicePixels="True">
            <controls:PinardTabControl.Resources>
                <Style TargetType="{x:Type TabItem}">
                    <Setter Property="Template" Value="{StaticResource ClosableTabItemTemplate}" />
                </Style>
            </controls:PinardTabControl.Resources>
            <controls:PinardTabControl.Template>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    **<Grid x:Name="tabItem"** 
                        ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel x:Name="HeaderPanel" IsItemsHost="true" Margin="2,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"/>
                        <Border x:Name="ContentPanel" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local">
                            <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>

            </controls:PinardTabControl.Template>
            <controls:PinardTabControl.Triggers>
                <EventTrigger RoutedEvent="controls:PinardTabControl.SelectionChanging">
                    <BeginStoryboard>
                        <Storyboard Name="FormFade">
                            <DoubleAnimation  Name="FormFadeAnimation"
                                        **Storyboard.TargetName="tabItem"**
                                        Storyboard.TargetProperty="(UIElement.Opacity)"
                                        From="0.0" To="1.0" Duration="0:0:0.25"
                                        AutoReverse="False" RepeatBehavior="1x"
                                     />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </controls:PinardTabControl.Triggers>
        </controls:PinardTabControl>
    </aero:SystemDropShadowChrome>
</DataTemplate>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:10:33+00:00Added an answer on May 29, 2026 at 8:10 am

    Elements inside templates have a different scope, you cannot access them from the outside. Maybe you could try to move the animation parts into the template as well (ControlTemplate.Triggers).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Custom uitableviewcell: ScrollViewCell I want to know what the difference is between
I have a custom control that is derived from TabItem , and I want
I have custom tool strip button BindableToolStripButton : ToolStripButton It works well, but I
I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have custom classes that I currently instantiate within App.xaml as resources. I want
hi i would like to create a custom calendar, this calendar will have custom
I have a custom tab control, which displays a frame inside the TabItem, and
I have a custom TabItem with a close button(denoted by X) on it so
I have custom Question objects which I render into html form elements. I want
I have a TabControl where the TabItem s are DataTemplat ed. The template seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.