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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:27:16+00:00 2026-06-17T18:27:16+00:00

In xaml it was possible to handle controls’ appearance using DataTemplate.Triger but in win8

  • 0

In xaml it was possible to handle controls’ appearance using DataTemplate.Triger but in win8 xaml it is not available:

<DataTrigger Binding="{Binding Role.Count, Converter={StaticResource isGreaterThanZero}" Value="True">
    <Setter TargetName="Counts" Property="Visibility" Value="Hidden" />
</DataTrigger>

How to do the same thing in windows 8 xaml?

  • 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-06-17T18:27:17+00:00Added an answer on June 17, 2026 at 6:27 pm

    If you look at the default Visual Studio Templates for Grid and Split layouts, you will find an example of a value converter that sets a controls visibility based on a Boolean value. The code is shown here

    public sealed class BooleanToVisibilityConverter : IValueConverter
        {
            public object Convert(object value, Type targetType, object parameter, string language)
            {
                return (value is bool && (bool)value) ? Visibility.Visible : Visibility.Collapsed;
            }
    
            public object ConvertBack(object value, Type targetType, object parameter, string language)
            {
                return value is Visibility && (Visibility)value == Visibility.Visible;
            }
        }
    

    All you would need to is copy this code and modify it to set the visibility property based on an integer value – IntToVisibilityConverter, for example. You would use the converter like this on the control you wanted to be affected

    Visibility="{Binding IsActive, Converter={StaticResource IntToVisibilityConverter}}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to solve the following with pure XAML if possible, but if it
Is it possible to create your own widgets in XAML?
Is it possible to create a Line in XAML (without any C# code behind)
Is it possible, to set the autofocus to the textbox in my xaml file?
xaml side: <DataGrid Name=MyGrid ItemsSource={Binding} /> I tried also with: <DataGrid Name=MyGrid ItemsSource={Binding MyObj}
i was wondering how can I handle screen rotations for windows 8 applications using
Possible Duplicate: XAML Conditional Compilation I am new to WPF. I just need to
Is it possible to create a .xaml (silverlight) control in a web application project?
is it possible to convert a xaml-file to an image file of some sort?
Is it possible to set a style's TargetType property in XAML to a Generic

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.