Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If Tile is disabled then this is now shown #2263

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions MahApps.Metro/Themes/Tile.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled"
Value="False">
<Setter Property="Opacity"
Value=".55" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
Expand Down
20 changes: 14 additions & 6 deletions samples/MetroDemo/ExampleViews/TilesExample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
xmlns:metroDemo="clr-namespace:MetroDemo"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300"
d:DataContext="{d:DesignInstance metroDemo:MainWindowViewModel}">

<UserControl.Resources>
Expand Down Expand Up @@ -35,6 +33,15 @@
<Setter Property="TitleFontSize"
Value="10" />
</Style>
<Style x:Key="BigTileStyle"
TargetType="Controls:Tile">
<Setter Property="Width"
Value="300" />
<Setter Property="Height"
Value="125" />
<Setter Property="TitleFontSize"
Value="10" />
</Style>
</ResourceDictionary>
</UserControl.Resources>

Expand Down Expand Up @@ -85,14 +92,15 @@
<Controls:Tile Title="People"
Style="{StaticResource LargeTileStyle}"
Background="#D2691E" />
<Controls:Tile Title="Weather"
Style="{StaticResource LargeTileStyle}"
Background="#1E90FF" />
<Controls:Tile Title="People (disabled)"
IsEnabled="False"
Style="{StaticResource SmallTileStyle}"
Background="#D2691E" />
<Controls:Tile Title="Weather"
Style="{StaticResource SmallTileStyle}"
Background="#1E90FF" />
<Controls:Tile Title="Store"
Style="{StaticResource SmallTileStyle}"
Style="{StaticResource LargeTileStyle}"
Background="Green" />
</WrapPanel>
</Grid>
Expand Down