Files
ShrlAlgoToolkit/Melskin/Controls/PropertyField.xaml

31 lines
1.4 KiB
Plaintext
Raw Normal View History

2025-07-31 20:12:24 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2026-02-20 15:31:44 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sv="clr-namespace:Melskin.Controls">
2025-07-31 20:12:24 +08:00
<Style TargetType="{x:Type sv:PropertyField}">
<Setter Property="PropertyName" Value="(PropertyName)" />
<Setter Property="PropertyValue" Value="" />
<Setter Property="ReadOnly" Value="False" />
<Setter Property="NameAreaWidth" Value="2*" />
<Setter Property="ValueAreaWidth" Value="3*" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type sv:PropertyField}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{TemplateBinding NameAreaWidth}" />
<ColumnDefinition Width="{TemplateBinding ValueAreaWidth}" />
</Grid.ColumnDefinitions>
2026-02-20 15:31:44 +08:00
<Label Grid.Column="0" Content="{TemplateBinding PropertyName}" />
2025-07-31 20:12:24 +08:00
<TextBox
Grid.Column="1"
IsReadOnly="{TemplateBinding ReadOnly}"
Text="{TemplateBinding PropertyValue}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>