We're working with the ModernUI framework for our WPF apps. I've come across a style called Heading2, but I cannot find it anywhere in our code, either the XAML or the C# code. Is Heading2 defined somewhere in ModernUI?
Asked
Active
Viewed 98 times
1
-
It's not in your code, and you can't find it anywhere else? Would this question be more suitable for [another Stack Exchange site](https://puzzling.stackexchange.com)? Is the answer "what have I got in my pocket?" – 15ee8f99-57ff-4f92-890c-b56153 May 11 '17 at 17:55
1 Answers
1
Yes, you can reference it in your code as below:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="300" Width="300">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FirstFloor.ModernUI;component/Assets/TextBlock.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Hello Heading2!" Style="{StaticResource Heading2}"></TextBlock>
<TextBlock Text="No Heading..."></TextBlock>
</StackPanel>
</Grid>

jsanalytics
- 13,058
- 4
- 22
- 43