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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:34:40+00:00 2026-05-12T15:34:40+00:00

I have a Silverlight DataGrid that contains a RowDetailsTemplate. The RowDetailsTemplate contains a TabControl

  • 0

I have a Silverlight DataGrid that contains a RowDetailsTemplate. The RowDetailsTemplate contains a TabControl with several TabItems. The DataGrid will be bound with items of type Contact. Contact has a property called ContactType. I would like to have several of the TabItems be hidden when ContactType is Client. Ideally I would like to do this through DataBinding but I haven’t found anyway to do this yet.

  • 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-12T15:34:40+00:00Added an answer on May 12, 2026 at 3:34 pm

    Bind the TabItem.Visibility in the RowDetailTemplate to the ContactType using a Value Converter that converts ContactType to Visiblity. You should add the ContactTypeConverter to the app or page as a resource.

    <TabItem 
        Visibility="{Binding ContactType, Converter={StaticResource ContactTypeConverter}}"/>
    
    namespace Demo
    {
    using System;
    using System.Windows;
    using System.Windows.Data;
    
    public enum ContactType
    {
        Client
    };
    
    /// <summary>
    /// A Value converter
    /// </summary>
    public class ContactTypeConverter : IValueConverter
    {
        #region IValueConverter Members
    
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var contactType = (ContactType) value;
    
            switch (contactType)
            {
                case ContactType.Client:
                    return Visibility.Visible;
    
                default:
                    return Visibility.Collapsed;
            }
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return DependencyProperty.UnsetValue;
        }
    
        #endregion
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight 2.0 DataGrid that contains a list of items that needs
I have a Silverlight DataGrid that contains a single template column which displays a
I have a Silverlight 4 DataGrid which has its ItemsSource bound to an ObservableCollection
I have found that datagrid columns can be dynamically created and bound in Silverlight.
I have a Silverlight 4 application that uses a DataGrid. This DataGrid is bound
So I have a datagrid in Silverlight that is bound to a WCF that
I have a Silverlight DataGrid that's being populated with different types of data for
I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I have a Silverlight application that is using a DataGrid. Inside of that DataGrid
I have a simple Silverlight 5 datagrid bound to a ObservableCollection of objects: <sdk:DataGrid

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.