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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:29:03+00:00 2026-05-28T04:29:03+00:00

I am trying to fade in a control when it becomes visible. The following

  • 0

I am trying to fade in a control when it becomes visible. The following compiles and runs fine, it just doesn’t fade in (control instantly appears when IsActive is set to true)

<UserControl x:Class="blah"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:util="clr-namespace:blah.Util"
             mc:Ignorable="d" 
             d:DesignHeight="250" d:DesignWidth="400">
    <UserControl.Resources>
        <util:BooleanToVisibilityConverter x:Key="BoolToVis" />

        <Style TargetType="UserControl">
            <Style.Triggers>
                <Trigger Property="Visibility" Value="Visible">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0.0" To="1.0" Duration="0:0:1.25" />
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <UserControl.Visibility>
        <Binding Path="IsActive" Converter="{StaticResource ResourceKey=BoolToVis}" ConverterParameter="False" />
    </UserControl.Visibility> 

    <!-- Snip rest of simple control -->

</UserControl>

Firstly, I’d be grateful if anyone could tell me why this isn’t working.

Secondly I was wondering if there is any way to debug such things, as I often find myself trying to get triggers working properly. Currently my debugging consists of staring at the XAML to try and see what’s wrong, or randomly changing bits to try and narrow down the area.

What I really want to do it put a breakpoint on the <Trigger Property="Visibility" Value="Visible"> bit, to see if that is being triggered as a starting point. Obviously I can’t do this but was wondering if there’s any way to do more structured debugging rather than my current random poking at a blank wall. :-/

  • 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-28T04:29:03+00:00Added an answer on May 28, 2026 at 4:29 am

    Set UserControl.Visibility in Style or you will override the Style.Trigger if you set the Visibility property explicitly.

    <Setter Property="Visibility" Value="{Binding Path=IsActive, Converter={StaticResource ResourceKey=BoolToVis}, ConverterParameter=False}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying to create a fade effect with the following...ive been told im
I was trying to have a specific div fade in (left_panel_fade), and stay visible
I'm trying to popup a user control and then fade it out over 3
I'm trying to loop through a set of div tags and fade them in
I'm trying to fade in a new control to my application's app area which
I'm trying to design a tab control which will fade out the current content
I am trying to fade out a Flash embed object and fade in regular
I'm trying to fade in the background colour of a table row, and can't
I'm trying to fade all elements on a webpage except for one div. I've
I'm trying to fade in my menu bar after an empty div is loaded

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.