DateEntry UI
This commit is contained in:
@@ -6,6 +6,88 @@
|
|||||||
x:DataType="vm:DateEntryViewModel"
|
x:DataType="vm:DateEntryViewModel"
|
||||||
Header="{Binding Key}">
|
Header="{Binding Key}">
|
||||||
<SettingsExpander.Footer>
|
<SettingsExpander.Footer>
|
||||||
<DatePicker SelectedDate="{Binding Value}" />
|
<Grid>
|
||||||
|
<DatePicker SelectedDate="{Binding Value}">
|
||||||
|
<DatePicker.Styles>
|
||||||
|
<Style Selector="DatePicker.Write">
|
||||||
|
<Setter Property="MinWidth" Value="{Binding Width}" />
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="DatePicker.Read">
|
||||||
|
<Setter Property="MinWidth" Value="0" />
|
||||||
|
<Setter Property="IsVisible" Value="False" />
|
||||||
|
</Style>
|
||||||
|
</DatePicker.Styles>
|
||||||
|
<Interaction.Behaviors>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Read}">
|
||||||
|
<AddClassAction ClassName="Read" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Write" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.New}">
|
||||||
|
<AddClassAction ClassName="Write" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Read" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Write}">
|
||||||
|
<AddClassAction ClassName="Write" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Read" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
</Interaction.Behaviors>
|
||||||
|
</DatePicker>
|
||||||
|
<TextBox Text="{Binding Value, StringFormat=d}">
|
||||||
|
<TextBox.Styles>
|
||||||
|
<Style Selector="TextBox.Write">
|
||||||
|
<Setter Property="IsVisible" Value="False" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="TextBox.Read">
|
||||||
|
<Setter Property="MinWidth" Value="0" />
|
||||||
|
<Setter Property="IsReadOnly" Value="True" />
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Opacity="0.7" Color="{DynamicResource TextFillColorPrimary}" />
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^:pointerover">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Opacity="0.7" Color="{DynamicResource TextFillColorPrimary}" />
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^ /template/ Border#PART_BorderElement">
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^:focus">
|
||||||
|
<Setter Property="Foreground">
|
||||||
|
<Setter.Value>
|
||||||
|
<SolidColorBrush Opacity="0.7" Color="{DynamicResource TextFillColorPrimary}" />
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style Selector="^ /template/ Border#PART_BorderElement">
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</TextBox.Styles>
|
||||||
|
<Interaction.Behaviors>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Read}">
|
||||||
|
<AddClassAction ClassName="Read" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Write" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.New}">
|
||||||
|
<AddClassAction ClassName="Write" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Read" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Write}">
|
||||||
|
<AddClassAction ClassName="Write" RemoveIfExists="True" />
|
||||||
|
<RemoveClassAction ClassName="Read" />
|
||||||
|
</DataTriggerBehavior>
|
||||||
|
</Interaction.Behaviors>
|
||||||
|
</TextBox>
|
||||||
|
</Grid>
|
||||||
</SettingsExpander.Footer>
|
</SettingsExpander.Footer>
|
||||||
</SettingsExpander>
|
</SettingsExpander>
|
||||||
|
|||||||
@@ -78,7 +78,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</TextBox.Styles>
|
</TextBox.Styles>
|
||||||
|
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Read}">
|
<DataTriggerBehavior Binding="{Binding State}" Value="{x:Static vm:ItemState.Read}">
|
||||||
<AddClassAction ClassName="Read" RemoveIfExists="True" />
|
<AddClassAction ClassName="Read" RemoveIfExists="True" />
|
||||||
|
|||||||
Reference in New Issue
Block a user