refactor(desktop): set some easy properties in constructor
This commit is contained in:
parent
5d256245db
commit
41a8dc88fd
|
@ -1,8 +1,16 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using XIVChatCommon;
|
||||
|
||||
namespace XIVChat_Desktop.Controls {
|
||||
public class MessageTextBlock : SelectableTextBlock {
|
||||
public MessageTextBlock() {
|
||||
this.SetBinding(FontSizeProperty, new Binding("Config.FontSize") {
|
||||
Source = (App)Application.Current,
|
||||
});
|
||||
this.TextWrapping = TextWrapping.Wrap;
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty MessageProperty = DependencyProperty.Register(
|
||||
"Message",
|
||||
typeof(ServerMessage),
|
||||
|
|
|
@ -47,8 +47,6 @@
|
|||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<cc:MessageTextBlock FontFamily="Global User Interface, /Resources/fonts/#XIV AXIS Std ATK"
|
||||
TextWrapping="Wrap"
|
||||
FontSize="{Binding App.Config.FontSize, ElementName=Main, UpdateSourceTrigger=PropertyChanged}"
|
||||
ProcessMarkdown="{Binding ExportTab.ProcessMarkdown, ElementName=Main}"
|
||||
Message="{Binding .}"
|
||||
ShowTimestamps="{Binding ShowTimestamps, ElementName=Main}" />
|
||||
|
|
Loading…
Reference in New Issue