Multiple fixes for Views and ViewModels.
This commit is contained in:
		@@ -61,7 +61,8 @@
 | 
			
		||||
    <DockPanel Margin="10">
 | 
			
		||||
        <Label DockPanel.Dock="Top" Target="{Binding ElementName=settingsList}">Bitte Stil auswählen:</Label>
 | 
			
		||||
        <StackPanel DockPanel.Dock="Right" Margin="10 0 0 0">
 | 
			
		||||
            <Button Command="{Binding UseSettingsCommand}" IsDefault="True" x:Name="OkButton">
 | 
			
		||||
            <Button Command="{Binding UseSettingsCommand}" IsDefault="True" x:Name="OkButton"
 | 
			
		||||
                    ToolTip="Stil auswählen und Textblock damit formatieren (Enter)">
 | 
			
		||||
                <StackPanel Orientation="Horizontal">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/f.png" Width="32" />
 | 
			
		||||
                    <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Auswählen</TextBlock>
 | 
			
		||||
@@ -74,16 +75,16 @@
 | 
			
		||||
                <Button Command="{Binding DeleteSettingsCommand}" ToolTip="Entfernen" Margin="5 0 0 5">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/minus.png" Width="24" />
 | 
			
		||||
                </Button>
 | 
			
		||||
                <Button Command="{Binding EditSettingsCommand}" ToolTip="Bearbeiten" Margin="0 5 5 5">
 | 
			
		||||
                <Button Command="{Binding EditSettingsCommand}" ToolTip="Bearbeiten (Leertaste)" Margin="0 5 5 5">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/pen.png" Width="24" />
 | 
			
		||||
                </Button>
 | 
			
		||||
                <Button Command="{Binding CopySettingsCommand}" ToolTip="Kopieren" Margin="5 5 0 5">
 | 
			
		||||
                <Button Command="{Binding CopySettingsCommand}" ToolTip="Kopieren (STRG+D)" Margin="5 5 0 5">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/duplicate.png" Width="24" />
 | 
			
		||||
                </Button>
 | 
			
		||||
                <Button Command="{Binding ExportSettingsCommand}" ToolTip="Exportieren" Margin="0 5 5 5">
 | 
			
		||||
                <Button Command="{Binding ExportSettingsCommand}" ToolTip="Exportieren (STRG+S)" Margin="0 5 5 5">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/export.png" Width="24" />
 | 
			
		||||
                </Button>
 | 
			
		||||
                <Button Command="{Binding ImportSettingsCommand}" ToolTip="Importieren" Margin="5 5 0 5">
 | 
			
		||||
                <Button Command="{Binding ImportSettingsCommand}" ToolTip="Importieren (STRG+O)" Margin="5 5 0 5">
 | 
			
		||||
                    <Image Source="/zaaReloaded2;component/Icons/import.png" Width="24" />
 | 
			
		||||
                </Button>
 | 
			
		||||
                <Button Command="{Binding ResetSettingsCommand}" ToolTip="Auf Werkseinstellungen zurücksetzen"
 | 
			
		||||
@@ -98,6 +99,15 @@
 | 
			
		||||
        <ListBox ItemsSource="{Binding SettingsList}"
 | 
			
		||||
                    DisplayMemberPath="Name"
 | 
			
		||||
                    ItemContainerStyle="{DynamicResource ResourceKey=ViewModelListBox}"
 | 
			
		||||
                    x:Name="settingsList" />
 | 
			
		||||
                    x:Name="settingsList">
 | 
			
		||||
            <ListBox.InputBindings>
 | 
			
		||||
                <MouseBinding Gesture="LeftDoubleClick" Command="{Binding UseSettingsCommand}" />
 | 
			
		||||
                <KeyBinding Key="Space" Command="{Binding EditSettingsCommand}" />
 | 
			
		||||
                <KeyBinding Key="Delete" Command="{Binding DeleteSettingsCommand}" />
 | 
			
		||||
                <KeyBinding Key="S" Modifiers="Control" Command="{Binding ExportSettingsCommand}" />
 | 
			
		||||
                <KeyBinding Key="O" Modifiers="Control" Command="{Binding ImportSettingsCommand}" />
 | 
			
		||||
                <KeyBinding Key="D" Modifiers="Control" Command="{Binding CopySettingsCommand}" />
 | 
			
		||||
            </ListBox.InputBindings>
 | 
			
		||||
        </ListBox>
 | 
			
		||||
    </DockPanel>
 | 
			
		||||
</Window>
 | 
			
		||||
 
 | 
			
		||||
@@ -72,27 +72,35 @@
 | 
			
		||||
                        <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" Margin="5 0 0 10">
 | 
			
		||||
                        <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" Margin="5 0 0 10">
 | 
			
		||||
                        <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" Margin="0 0 5 10">
 | 
			
		||||
                        <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" Margin="5 0 0 10">
 | 
			
		||||
                        <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" Margin="0 0 5 10">
 | 
			
		||||
                        <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}">
 | 
			
		||||
                    <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}" />
 | 
			
		||||
 
 | 
			
		||||
@@ -29,5 +29,10 @@ namespace zaaReloaded2.Views
 | 
			
		||||
        {
 | 
			
		||||
            InitializeComponent();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void TreeView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user