2021-08-05 20:45:26 -05:00
|
|
|
<ResourceDictionary
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractRichTextBlockStyle"
|
2024-03-12 17:06:06 -05:00
|
|
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
2021-08-05 20:45:26 -05:00
|
|
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
|
|
|
|
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/OwlCore.Wpf;component/AbstractUI/Themes/AbstractUIResources.xaml" />
|
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
|
|
<DataTemplate x:Key="DefaultAbstractRichTextBlockTemplate" DataType="abstractUI:AbstractRichTextBlockViewModel">
|
|
|
|
|
<StackPanel>
|
2024-05-17 20:53:11 -05:00
|
|
|
<TextBlock Text="{Binding Title, Mode=OneWay}" ToolTipService.ToolTip="{Binding TooltipText, Mode=OneWay}"
|
|
|
|
|
Style="{DynamicResource AbstractUICollectionTitleStyle}" />
|
2021-08-05 20:45:26 -05:00
|
|
|
|
2024-05-17 20:53:11 -05:00
|
|
|
<TextBlock Text="{Binding Subtitle, Mode=OneWay}"
|
|
|
|
|
Visibility="{Binding Path=Subtitle, TargetNullValue=Collapsed, Mode=OneWay}"
|
|
|
|
|
Style="{DynamicResource AbstractUICollectionSubtitleStyle}" />
|
2021-08-05 20:45:26 -05:00
|
|
|
|
|
|
|
|
<!-- TODO: Marddown text block for WPF? -->
|
|
|
|
|
<!--<controls:MarkdownTextBlock Text="{Binding RichText}"/>-->
|
2024-05-17 20:53:11 -05:00
|
|
|
<TextBlock Text="{Binding RichText}"/>
|
2021-08-05 20:45:26 -05:00
|
|
|
</StackPanel>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="controls:AbstractRichTextBlockPresenter">
|
|
|
|
|
<Style.Setters>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="controls:AbstractTextBoxPresenter">
|
|
|
|
|
<ContentControl ContentTemplate="{StaticResource DefaultAbstractRichTextBlockTemplate}"
|
2021-10-23 21:51:51 -05:00
|
|
|
Content="{Binding}"
|
2021-08-05 20:45:26 -05:00
|
|
|
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style.Setters>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
</ResourceDictionary>
|