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 6868727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:28:11+00:00 2026-05-27T03:28:11+00:00

Is it possible, in Silverlight 4.0, to disable some ListBoxItems with XAML binding? I

  • 0

Is it possible, in Silverlight 4.0, to disable some ListBoxItems with XAML binding?

I have found some solutions in the web, but nothing that works with Silvelight 4.0

Thank you!

Pileggi

  • 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-27T03:28:11+00:00Added an answer on May 27, 2026 at 3:28 am

    Pant, pant! … At least I have found the solution but it was hard!

    My solution is:

    <Style x:Key="modItemMainParts" TargetType="ListBoxItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid x:Name="g" Background="{TemplateBinding Background}">
    
                        ...
    
                        <i:Interaction.Triggers>
                            <ei:DataTrigger Binding="{Binding abilitato}" Value="False">
                                <ei:ChangePropertyAction TargetObject="{Binding ElementName=g}" TargetName="IsHitTestVisible" Value="False" PropertyName="IsHitTestVisible"/>
                                <ei:ChangePropertyAction TargetObject="{Binding ElementName=g}" TargetName="Opacity" Value="0.5" PropertyName="Opacity"/>
                            </ei:DataTrigger>
                        </i:Interaction.Triggers>
                     </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    

    The conclusions are presonal and certainly some problems can be worked around, but…

    • In contrast to WPF, in Silverlight a DataTrigger (with its ChangePropertyAction) can’t stay elsewhere then inside a control inside the Template. And the property TargetObject of the ChangePropertyAction object, can be binded only linking the name of a control inside the template (TargetObject=”{Binding ElementName=g}” )

    • For this reason it’s impossible to bind the DataTrigger with the entire Item and to set it’s property IsEnabled but we need to work with every single control, and we need to reproduce the behaviour of the Item when it’s disabled. Particularly we can set the property IsHitTestVisible of the main Grid, that contains every other controls, to False, to avoid that it were responsible for the mouse inputs.

    Finally in WPF it was quite more easy, but the important is to know what to do.

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

Sidebar

Related Questions

Possible Duplicate: Silverlight XML editor / syntax highlighting Hello, I have some XML in
Is it possible to configure the TreeView control in the Silverlight tookit such that
Possible Duplicate: silverLight childWindow how can i do that my child window will be
I have a Oata i.e., WCF data service running.Is it possible for silverlight client
Hello Guys I simply want to ask that is it possible to deploy Silverlight
I have a Silverlight application that needs to upload large files to the server.
I have a Silverlight app that is using the MVVM pattern. I have a
Is that possible to use themes from Silverlight Toolkit in Windows Phone 7 applications?
Is it possible to build silverlight application in on-demand manner. I have lot of
Is it possible to have a Silverlight client app directly access the Azure Table

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.