76 lines
3.2 KiB
XML
76 lines
3.2 KiB
XML
<UserControl
|
|
x:Class="Bitvault.Avalonia.ItemView"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:Bitvault"
|
|
x:DataType="vm:ItemViewModel">
|
|
<UserControl.Styles>
|
|
<Style Selector="TextBox.Write">
|
|
<Setter Property="MinWidth" Value="264" />
|
|
</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="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>
|
|
</UserControl.Styles>
|
|
<Interaction.Behaviors>
|
|
<AttachedBehaviour>
|
|
<NavigateAction
|
|
Region="{Binding Named, StringFormat='{}{0}:ContentHeader'}"
|
|
Route="ItemCommandHeader"
|
|
Scope="self" />
|
|
</AttachedBehaviour>
|
|
<DataTriggerBehavior
|
|
Binding="{Binding State}"
|
|
ComparisonCondition="Equal"
|
|
Value="{x:Static vm:ItemState.Read}">
|
|
<ConditionAction>
|
|
<ConditionAction.Condition>
|
|
<ConditionalExpression ForwardChaining="And">
|
|
<ComparisonCondition LeftOperand="{Binding FromCategory}" RightOperand="True" />
|
|
</ConditionalExpression>
|
|
</ConditionAction.Condition>
|
|
<NavigateBackAction Region="Left" />
|
|
</ConditionAction>
|
|
</DataTriggerBehavior>
|
|
</Interaction.Behaviors>
|
|
<ScrollViewer Padding="12,12,12,0">
|
|
<ItemsControl ItemTemplate="{ReflectionBinding Template}" ItemsSource="{Binding}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Spacing="24" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</UserControl>
|