Skip to content

Is it possible to realize this loading button with the built-in methods? #3149

Closed Answered by Keboo
MatthewGuo93 asked this question in Q&A
Discussion options

You must be logged in to vote

So here is a working example.

Here is the code for it:

<Button Command="{Binding ClickCommand}">
  <Button.Resources>
    <!--
    This is a Material Design converter 
    Under normal circumstances, it should be declared higher up (at the UserControl/Window/App level). 
    The xmlns should be declared at the higher level too.
    -->
    <converters:BooleanToVisibilityConverter 
      xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf"
      x:Key="InverseBooleanToVisibilityConverter" FalseValue="Visible" TrueValue="Collapsed" />
  </Button.Resources>
  <Button.Content>
    <StackPanel Orientation="Horizontal">
      <!-- 
      Sets t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatthewGuo93
Comment options

Answer selected by MatthewGuo93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants