Skip to content

1.1.3.0 - ProgressBar ignoring 'IsIndeterminate' value #2180

@TravyDale

Description

@TravyDale

You had me switch to the Alpha version 1.1.3.0 for testing another issue ( #2160). While testing this version, I noticed my ProgressBar ignores the IsIndeterminate value only when I use a Visibility binding. If I were to take the Visibility logic out of the XAML, it works fine. What makes this goofy is that my other window has the exact same logic (uses a different boolean to control Visibility) and that works just fine.

I am basically hiding the ProgressBar until the user enters in their credentials and clicks Login. I have a Boolean that is controlling the Visibility. After doing some playing with this control, I noticed that it looks like the ProgressBar turns into a Non-Indeterminate bar and basically has a value of 100 (Bar is full). Any suggestions on how to get this back to working?

untitled

<StackPanel Grid.Row="1" Grid.Column="1">
    <TextBox x:Name="txtId" Text="{Binding UserId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsBusy, Converter={StaticResource inverseBoolConverter}}" Controls:TextBoxHelper.Watermark="User Id" Controls:TextBoxHelper.ClearTextButton="True" FontSize="18" Height="35" Width="200" Margin="0,5,0,15" />
    <PasswordBox x:Name="txtPassword" IsEnabled="{Binding IsBusy, Converter={StaticResource inverseBoolConverter}}" Controls:TextBoxHelper.Watermark="Password" Controls:TextBoxHelper.ClearTextButton="True" FontSize="18" Height="35" Width="200" Margin="0,0,0,15">
        <PasswordBox.InputBindings>
            <KeyBinding Key="Enter" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" />
            <KeyBinding Key="Return" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" />
        </PasswordBox.InputBindings>
    </PasswordBox>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,10">
        <Button x:Name="btnCancel" Content="Cancel" Margin="0,0,15,0" Click="btnCancel_Click" Width="75" FontSize="12" />
        <Button x:Name="btnLogin" Content="Login" IsEnabled="{Binding IsBusy, Converter={StaticResource inverseBoolConverter}}" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" Width="75" FontSize="12" />
    </StackPanel>
    <Controls:MetroProgressBar IsIndeterminate="True" Visibility="{Binding IsBusy, Converter={StaticResource boolToVisConv}}" />
    <TextBlock Text="{Binding Errors}" Foreground="Red" HorizontalAlignment="Center" Visibility="{Binding Errors, Converter={StaticResource stringToVisibilityConverter}}" TextWrapping="Wrap" FontSize="16" />
</StackPanel>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions