Files
ShrlAlgoToolkit/NeuWPF/NeoUI/Controls/PropertyField.xaml
ShrlAlgo 955a01f564 整理
2025-08-20 12:10:35 +08:00

31 lines
1.4 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sv="clr-namespace:NeoUI.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<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>
<Label Content="{TemplateBinding PropertyName}" Grid.Column="0" />
<TextBox
Grid.Column="1"
IsReadOnly="{TemplateBinding ReadOnly}"
Text="{TemplateBinding PropertyValue}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>