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

  • Home
  • SEARCH
  • 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 4026088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:55:37+00:00 2026-05-20T10:55:37+00:00

I have a TabControl, and on the second tab is a button: <Button Name=deleteResourceBtn>

  • 0

I have a TabControl, and on the second tab is a button:

<Button Name="deleteResourceBtn">
    <Button.Style>
        <Style TargetType="{x:Type Button}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding SelectedIndex, ElementName=loadChartResourceListView}" Value="-1">
                    <Setter Property="IsEnabled" Value="False" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Button.Style>
    <Image ToolTip="Delete Resource" Source="pack://application:,,,/...namespace omitted;component/Graphics/deleteBtn.png" Style="ButtonImageStyle" />
</Button>

I’m binding to a list control named loadChartResourceListView… the error I’m receiving is:

‘XamlParseException Set property
‘System.Windows.FrameworkElement.Style’
threw an exception.’ Line number ‘221’
and line position ’39’.

line 221 is </Style> … not really seeing an issue with my binding, unless the TabControl hasn’t loaded the second tab? Does a TabControl load tabs “on demand” ? Parhaps the second tab hasn’t loaded and its trying to bind?

  • 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-20T10:55:37+00:00Added an answer on May 20, 2026 at 10:55 am

    If you look at the InnerException you’ll see that you have an ArgumentException saying

    ‘ButtonImageStyle’ is not a valid
    value for property ‘Style’.

    So I believe the error is coming from the Image style

    Try changing Style="ButtonImageStyle" to Style="{StaticResource ButtonImageStyle}"

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

Sidebar

Related Questions

Facts: I have a TabControl with 2 Tabs, Each tab has 2 DateTimePicker. In
I have a TabControl within a TabControl. I want the outer TabControl to show
I have derived a TabControl with the express purpose of enabling double buffering, except
I have a WPF TabControl with two TabItems. Each TabItem contains a ListBox with
Say I have a Textbox nested within a TabControl . When the form loads,
I have a form that displays file information in a TabControl, and I'd like
I have a Tab Control with multiple Tab Pages. I want to be able
I have a page with a tab control and each control has almost 15
I have the basic tabs made and I want each tab to have a
I'm building a Winforms application in C# and I have added a tab control

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.