DropDownButton IsOpen Property not working

Aug 23, 2010 at 9:24 AM

Hi.

I'm using the Fluent.DropDownButton to display a Fluent.Gallery. However, I'd like to bind the IsOpen property to determine which of my DropDownButton's is currently selected.

 <Fluent:DropDownButton Text="Stroke" SizeDefinition="Middle" IsOpen="{Binding IsOpen}">
                    <ColorSelectorModule:ColorGallery/>
                </Fluent:DropDownButton>


But if I click one of the DropDownButtons, nothing happens. The IsOpen-Property doesn't seem to get called/used, since my PropertyChangedCallback isn't getting called.

  public bool IsOpen
        {
            get { return (bool)GetValue(IsOpenProperty); }
            set { SetValue(IsOpenProperty, value); }
        }

        // Using a DependencyProperty as the backing store for IsOpen.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty IsOpenProperty =
            DependencyProperty.Register("IsOpen", typeof(bool), typeof(GridStyleVM), new FrameworkPropertyMetadata(false, OnIsOpenChanged));

 

If I set the IsOpen property to false or true in xaml, nothing happens either. The Button is not open if I set it to true. It's always closed.

 <Fluent:DropDownButton Text="Stroke" SizeDefinition="Middle" IsOpen="True">
                    <ColorSelectorModule:ColorGallery/>
                </Fluent:DropDownButton>

Am I doing sth wrong, am I interpreting the function of IsOpen incorrectly or is this property bugged?