zaaReloaded2/zaaReloaded2/Views/SettingsView.xaml

93 lines
4.9 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"
SizeToContent="WidthAndHeight" ResizeMode="CanResizeWithGrip" ShowInTaskbar="False"
b:WindowState.CenterScreen="True" b:WindowState.Save="True"
Title="Stil bearbeiten"
>
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/zaaReloaded2;component/Style.xaml" />
<ResourceDictionary>
<DataTemplate x:Key="ChildElement">
<TextBlock Text="{Binding DisplayString}" />
</DataTemplate>
<HierarchicalDataTemplate x:Key="ElementsTree"
ItemsSource="{Binding Elements}"
ItemTemplate="{StaticResource ResourceKey=ChildElement}">
<TextBlock Text="{Binding DisplayString}" />
</HierarchicalDataTemplate>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</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:Interaction.Triggers>
<StackPanel Margin="10">
<DockPanel IsEnabled="{Binding IsNameEnabled}">
<Label DockPanel.Dock="Left" Content="Name:" Target="{Binding ElementName=NameTextBox}"
Margin="0 0 10 0"/>
<TextBox Text="{Binding Name}" x:Name="NameTextBox" HorizontalAlignment="Stretch" />
</DockPanel>
<DockPanel>
<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>
<GroupBox Header="Elemente" Margin="0 10 0 0">
<DockPanel LastChildFill="True">
<StackPanel DockPanel.Dock="Right" Margin="10 0 0 0">
<Button Command="{Binding AddElementCommand}" Content="Neues Element" Margin="0 0 0 10"
x:Name="NewElementButton"/>
<Button Command="{Binding AddChildElementCommand}" Content="Neues Kindelement" Margin="0 0 0 10" />
<Button Command="{Binding EditElementCommand}" IsDefault="True" Content="Bearbeiten" Margin="0 0 0 10" />
<Button Command="{Binding CopyElementCommand}" Content="Kopieren" Margin="0 0 0 10" />
<Button Command="{Binding RemoveElementCommand}" Content="Entfernen" Margin="0 0 0 10" />
</StackPanel>
<TreeView ItemsSource="{Binding Elements}"
ItemTemplate="{StaticResource ResourceKey=ElementsTree}"
MinWidth="200"/>
</DockPanel>
</GroupBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Command="{Binding CloseViewCommand}" Content="Schließen" IsCancel="True" Margin="0 10 0 0"
Width="{Binding ElementName=NewElementButton,Path=ActualWidth}"/>
</StackPanel>
</StackPanel>
</Window>