Skip to content

Commit

Permalink
make hyperlinks for scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
ButchersBoy committed Mar 22, 2016
1 parent b423ce8 commit 08dc608
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
30 changes: 16 additions & 14 deletions MainDemo.Wpf/Typography.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignCaptionTextBlock}">
<Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignCaptionTextBlock}" x:Key="Caption">
<Setter Property="Opacity" Value=".68"></Setter>
</Style>
</UserControl.Resources>
Expand All @@ -33,47 +33,49 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0 26 0 0">Display 4 - MaterialDesignDisplay4TextBlock</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0 26 0 0" Style="{StaticResource Caption}">Display 4 - MaterialDesignDisplay4TextBlock</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay4TextBlock}" Margin="0 4 0 4">Light 112sp</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignDisplay4Hyperlink}">Light 112sp (Disabled)</Hyperlink></TextBlock>
<TextBlock Grid.Row="0" Grid.Column="4" Style="{StaticResource MaterialDesignDisplay4TextBlock}" Margin="0 4 0 4"><Hyperlink IsEnabled="False">Light 112sp (Disabled)</Hyperlink></TextBlock>

<TextBlock Grid.Row="1" Grid.Column="0" Margin="0 12 0 0">Display 3 - MaterialDesignDisplay3TextBlock</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0 12 0 0" Style="{StaticResource Caption}">Display 3 - MaterialDesignDisplay3TextBlock</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay3TextBlock}" Margin="0 4 0 4">Regular 56sp</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay3Hyperlink}">Regular 56sp</Hyperlink></TextBlock>
<!-- hyperlinks will pick up owner text block style... -->
<TextBlock Grid.Row="1" Grid.Column="4" Style="{StaticResource MaterialDesignDisplay3TextBlock}" Margin="0 4 0 4"><Hyperlink>Regular 56sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="2" Grid.Column="0" Margin="0 8 0 0">Display 2 - MaterialDesignDisplay2TextBlock</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0" Margin="0 8 0 0" Style="{StaticResource Caption}">Display 2 - MaterialDesignDisplay2TextBlock</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay2TextBlock}" Margin="0 4 0 4">Regular 45sp</TextBlock>
<!-- ...or hyperlink style can be ste manually -->
<TextBlock Grid.Row="2" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay2Hyperlink}">Regular 45sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="3" Grid.Column="0" Margin="0 8 0 0">Display 1 - MaterialDesignDisplay1TextBlock</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0" Margin="0 8 0 0" Style="{StaticResource Caption}">Display 1 - MaterialDesignDisplay1TextBlock</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="2" Style="{StaticResource MaterialDesignDisplay1TextBlock}" Margin="0 4 0 4">Regular 34sp</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignDisplay1Hyperlink}">Regular 34sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="4" Grid.Column="0" Margin="0 8 0 0">Headline - MaterialDesignHeadlineTextBlock</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0" Margin="0 8 0 0" Style="{StaticResource Caption}">Headline - MaterialDesignHeadlineTextBlock</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="2" Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 4 0 6">Regular 24sp</TextBlock>
<TextBlock Grid.Row="4" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignHeadlineHyperlink}">Regular 24sp (Disabled)</Hyperlink></TextBlock>

<TextBlock Grid.Row="5" Grid.Column="0" Margin="0 8 0 0">Title - MaterialDesignTitleTextBlock</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="0" Margin="0 8 0 0" Style="{StaticResource Caption}">Title - MaterialDesignTitleTextBlock</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="2" Style="{StaticResource MaterialDesignTitleTextBlock}" Margin="0 6 0 8">Medium 20sp</TextBlock>
<TextBlock Grid.Row="5" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignTitleHyperlink}">Medium 20sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center">Subheading - MaterialDesignSubheadingTextBlock</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource Caption}">Subheading - MaterialDesignSubheadingTextBlock</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="2" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="0 8 0 8">Regular 15sp</TextBlock>
<TextBlock Grid.Row="6" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignSubheadingHyperlink}">Regular 15sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="7" Grid.Column="0" VerticalAlignment="Center">Body 2 - MaterialDesignBody2TextBlock</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource Caption}">Body 2 - MaterialDesignBody2TextBlock</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="2" Style="{StaticResource MaterialDesignBody2TextBlock}" Margin="0 8 0 8">Medium 13sp</TextBlock>
<TextBlock Grid.Row="7" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignBody2Hyperlink}">Medium 13sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center">Body 1 - MaterialDesignBody1TextBlock</TextBlock>
<TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource Caption}">Body 1 - MaterialDesignBody1TextBlock</TextBlock>
<TextBlock Grid.Row="8" Grid.Column="2" Style="{StaticResource MaterialDesignBody1TextBlock}" Margin="0 8 0 8">Regular 13sp</TextBlock>
<TextBlock Grid.Row="8" Grid.Column="4" Margin="0 4 0 4"><Hyperlink IsEnabled="False" Style="{StaticResource MaterialDesignBody1Hyperlink}">Regular 13sp (Disabled)</Hyperlink></TextBlock>

<TextBlock Grid.Row="9" Grid.Column="0" VerticalAlignment="Center">Caption - MaterialDesignCaptionTextBlock</TextBlock>
<TextBlock Grid.Row="9" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource Caption}">Caption - MaterialDesignCaptionTextBlock</TextBlock>
<TextBlock Grid.Row="9" Grid.Column="2" Style="{StaticResource MaterialDesignCaptionTextBlock}" Margin="0 8 0 8">Regular 12sp</TextBlock>
<TextBlock Grid.Row="9" Grid.Column="4" Margin="0 4 0 4"><Hyperlink Style="{StaticResource MaterialDesignCaptionHyperlink}">Regular 12sp</Hyperlink></TextBlock>

<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center">Button - MaterialDesignButtonTextBlock</TextBlock>
<TextBlock Grid.Row="10" Grid.Column="0" VerticalAlignment="Center" Style="{StaticResource Caption}">Button - MaterialDesignButtonTextBlock</TextBlock>
<TextBlock Grid.Row="10" Grid.Column="2" Style="{StaticResource MaterialDesignButtonTextBlock}" Margin="0 8 0 8">MEDIUM (ALL CAPS) 14sp</TextBlock>

</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
<Style TargetType="{x:Type Hyperlink}" x:Key="MaterialDesignBody1Hyperlink">
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Regular"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueDarkBrush}" />
<Setter Property="TextDecorations" Value="None" />
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignCheckBoxDisabled}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground"
Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
</Trigger>
<Trigger Property="IsEnabled" Value="true">
<Trigger Property="IsEnabled" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
<MultiTrigger>
Expand Down

0 comments on commit 08dc608

Please sign in to comment.