MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
MaterialDesignRaisedButton's Indicator is not visible when button initial Visibility="Collapsed"
Bug explanation
Button Visibility initial value is "Collapsed",then changed to "Visible",the Indicator is not visible. Modifying the following code can fix the bug
Width="{TemplateBinding Width}"
Version
5.0.0
@zhuzixian Can you elaborate a bit on the issue you're seeing? I cannot seem to reproduce it.
With the following XAML:
<Button Content="Toggle Hide/Show Button Visibility"
Click="ToggleVisibilityButton_OnClick" />
<Button x:Name="HiddenButton"
Visibility="Collapsed"
Content="Hidden Button"
materialDesign:ButtonProgressAssist.Minimum="0"
materialDesign:ButtonProgressAssist.Maximum="10"
materialDesign:ButtonProgressAssist.Value="8"
materialDesign:ButtonProgressAssist.IsIndicatorVisible="True" />
And this click handler in the code-behind:
private void ToggleVisibilityButton_OnClick(object sender, RoutedEventArgs e)
=> HiddenButton.Visibility = HiddenButton.Visibility == Visibility.Collapsed ? Visibility.Visible : Visibility.Collapsed;
I get the following result which I believe is correct behavior?
This issue occurred in one of my projects,but I can't reproduce it through demo code,If analyzed from a code perspective is not a bug,please close this issue,I will report again when it reproduce.