功能更新
This commit is contained in:
31
Melskin/Controls/PropertyField.xaml
Normal file
31
Melskin/Controls/PropertyField.xaml
Normal file
@@ -0,0 +1,31 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:sv="clr-namespace:Melskin.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>
|
||||
Reference in New Issue
Block a user