138 lines
8.3 KiB
XML
Executable File
138 lines
8.3 KiB
XML
Executable File
<!--
|
|
SettingsView.xaml
|
|
part of zaaReloaded2
|
|
|
|
Copyright 2015 Daniel Kraus
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<Window x:Class="zaaReloaded2.Views.SettingsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
|
|
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
|
xmlns:action="clr-namespace:Bovender.Mvvm.Actions;assembly=Bovender"
|
|
Width="460" Height="400" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
|
|
MinWidth="460" MinHeight="400"
|
|
WindowStyle="ToolWindow" Topmost="True"
|
|
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
|
|
Title="Stil bearbeiten"
|
|
FocusManager.FocusedElement="{Binding ElementName=NameTextBox}"
|
|
>
|
|
<Window.Resources>
|
|
<ResourceDictionary Source="/Bovender;component/Style.xaml" />
|
|
</Window.Resources>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger SourceObject="{Binding AddElementMessage}" EventName="Sent">
|
|
<action:ShowViewDialogAction View="zaaReloaded2.Views.ElementPickerView" Assembly="zaaReloaded2" />
|
|
</i:EventTrigger>
|
|
<i:EventTrigger SourceObject="{Binding AddChildElementMessage}" EventName="Sent">
|
|
<action:ShowViewDialogAction View="zaaReloaded2.Views.ElementPickerView" Assembly="zaaReloaded2" />
|
|
</i:EventTrigger>
|
|
<i:EventTrigger SourceObject="{Binding EditElementMessage}" EventName="Sent">
|
|
<action:ShowViewDialogAction View="zaaReloaded2.Views.ElementView" Assembly="zaaReloaded2" />
|
|
</i:EventTrigger>
|
|
<i:EventTrigger SourceObject="{Binding ChangeControlElementMessage}" EventName="Sent">
|
|
<action:ShowViewDialogAction View="zaaReloaded2.Views.ElementPickerView" Assembly="zaaReloaded2" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
<DockPanel Margin="10">
|
|
<DockPanel DockPanel.Dock="Top" IsEnabled="{Binding IsNameEnabled}">
|
|
<Label DockPanel.Dock="Left" Content="Name:" Target="{Binding ElementName=NameTextBox}"
|
|
Margin="0 0 10 0"/>
|
|
<TextBox Text="{Binding Name,UpdateSourceTrigger=PropertyChanged}"
|
|
x:Name="NameTextBox" HorizontalAlignment="Stretch" />
|
|
</DockPanel>
|
|
<DockPanel DockPanel.Dock="Top">
|
|
<Label DockPanel.Dock="Left" Content="Referenzwerte anzeigen:" Margin="0 0 10 0"
|
|
Target="{Binding ElementName=ReferenceStyleChooser}" />
|
|
<ComboBox ItemsSource="{Binding ReferenceStyle.Choices}"
|
|
ToolTip="{Binding ReferenceStyle.ToolTip}"
|
|
SelectedItem="{Binding ReferenceStyle.SelectedItem}"
|
|
x:Name="ReferenceStyleChooser" HorizontalAlignment="Stretch" />
|
|
</DockPanel>
|
|
<DockPanel DockPanel.Dock="Top" Margin="0 10 0 0">
|
|
<Label DockPanel.Dock="Left" Content="Auszeichnung pathologischer Werte:" Margin="0 0 10 0"
|
|
Target="{Binding ElementName=AbnormalStyleChooser}" />
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<ToggleButton IsChecked="{Binding AbnormalBold}" Height="25" Width="25">
|
|
<TextBlock FontWeight="Black">F</TextBlock>
|
|
</ToggleButton>
|
|
<ToggleButton IsChecked="{Binding AbnormalItalics}" Height="25" Width="25">
|
|
<TextBlock FontStyle="Italic">K</TextBlock>
|
|
</ToggleButton>
|
|
<ToggleButton IsChecked="{Binding AbnormalUnderline}" Height="25" Width="25">
|
|
<TextBlock TextDecorations="Underline">U</TextBlock>
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Command="{Binding CloseViewCommand}" Content="Schließen" IsDefault="True" IsCancel="True"
|
|
Margin="0 10 0 0" />
|
|
</StackPanel>
|
|
<GroupBox Header="Elemente" Margin="0 10 0 0">
|
|
<DockPanel LastChildFill="True">
|
|
<StackPanel DockPanel.Dock="Right" Margin="10 0 0 0">
|
|
<!-- need the stack panel to prevent stretching of the uniform grid -->
|
|
<UniformGrid Columns="2">
|
|
<Button Command="{Binding AddElementCommand}" ToolTip="Neues Element" Margin="0 0 5 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/plus.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding EditElementCommand}" IsDefault="True" ToolTip="Bearbeiten (Leertaste)" Margin="5 0 0 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/pen.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding AddChildElementCommand}" ToolTip="Neues Kindelement" Margin="0 0 5 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/plus-child.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding MoveElementUpCommand}" ToolTip="Nach oben (STRG+HOCH)" Margin="5 0 0 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/up.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding DeleteElementCommand}" ToolTip="Entfernen (Entf)" Margin="0 0 5 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/minus.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding MoveElementDownCommand}" ToolTip="Nach unten (STRG+RUNTER)" Margin="5 0 0 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/down.png" Width="24" />
|
|
</Button>
|
|
<Button Command="{Binding CopyElementCommand}" ToolTip="Kopieren (STRG+D)" Margin="0 0 5 10">
|
|
<Image Source="/zaaReloaded2;component/Icons/duplicate.png" Width="24" />
|
|
</Button>
|
|
</UniformGrid>
|
|
</StackPanel>
|
|
<TreeView ItemsSource="{Binding Elements}" x:Name="treeview">
|
|
<TreeView.InputBindings>
|
|
<MouseBinding Gesture="MiddleClick" Command="{Binding EditElementCommand}" />
|
|
<KeyBinding Key="Space" Command="{Binding EditElementCommand}" />
|
|
<KeyBinding Key="Delete" Command="{Binding DeleteElementCommand}" />
|
|
<KeyBinding Key="Up" Modifiers="Control" Command="{Binding MoveElementUpCommand}" />
|
|
<KeyBinding Key="Down" Modifiers="Control" Command="{Binding MoveElementDownCommand}" />
|
|
<KeyBinding Key="D" Modifiers="Control" Command="{Binding CopyElementDownCommand}" />
|
|
</TreeView.InputBindings>
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="ToolTip" Value="{Binding ToolTip}" />
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
<TreeView.ItemTemplate>
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Elements}">
|
|
<TextBlock Text="{Binding DisplayString}" ToolTip="{Binding ToolTip}" />
|
|
</HierarchicalDataTemplate>
|
|
</TreeView.ItemTemplate>
|
|
</TreeView>
|
|
</DockPanel>
|
|
</GroupBox>
|
|
</DockPanel>
|
|
</Window>
|