Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change default value + change demo
  • Loading branch information
ElieTaillard committed Apr 21, 2022
commit cbb513d1f4ec8f54a17be9b60de78599211c1ab6
37 changes: 26 additions & 11 deletions MainDemo.Wpf/Buttons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
Expand Down Expand Up @@ -1096,19 +1092,38 @@
</smtx:XamlDisplay>
</StackPanel>

<Rectangle
Margin="0 24 0 0"
Height="1"
Fill="{DynamicResource MaterialDesignDivider}"
Grid.Row="11" />

<TextBlock
Style="{StaticResource MaterialDesignHeadline5TextBlock}"
Grid.Row="11"
Grid.Row="12"
Margin="0 24"
Text="Buttons - With Custom ShadowAssist Animation Duration"/>
Text="Buttons - With Custom Animation Duration"/>

<StackPanel
Grid.Row="12"
Grid.Row="13"
Orientation="Horizontal">
<Button materialDesign:ShadowAssist.ShadowAnimationDuration="0:0:0" Margin="0,0,20,0">Instant</Button>
<Button Margin="0,0,20,0">Default</Button>
<Button materialDesign:ShadowAssist.ShadowAnimationDuration="0:0:2">Long</Button>
<smtx:XamlDisplay UniqueKey="button_duration_1" Margin="0,0,20,0">
<Button Style="{StaticResource MaterialDesignRaisedAccentButton}"
materialDesign:ShadowAssist.ShadowAnimationDuration="0:0:0">
Instant Duration
</Button>
</smtx:XamlDisplay>
<smtx:XamlDisplay UniqueKey="button_duration_2" Margin="0,0,20,0">
<Button>
Default Duration
</Button>
</smtx:XamlDisplay>
<smtx:XamlDisplay UniqueKey="button_duration_3" Margin="0,0,20,0">
<Button Style="{StaticResource MaterialDesignRaisedDarkButton}"
materialDesign:ShadowAssist.ShadowAnimationDuration="0:0:0.5">
Long Duration
</Button>
</smtx:XamlDisplay>
</StackPanel>

</Grid>
</UserControl>
2 changes: 1 addition & 1 deletion MaterialDesignThemes.Wpf/ShadowAssist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static ShadowEdges GetShadowEdges(DependencyObject element)
propertyType: typeof(TimeSpan),
ownerType: typeof(ShadowAssist),
defaultMetadata: new FrameworkPropertyMetadata(
defaultValue: new TimeSpan(0, 0, 0, 0, 180),
defaultValue: new TimeSpan(0, 0, 0, 0, 150),
flags: FrameworkPropertyMetadataOptions.Inherits)
);

Expand Down