Use buttons in SettingsView.

This commit is contained in:
Daniel Kraus 2015-08-12 17:54:23 +02:00
parent 6f65340ca5
commit e0b749382e
7 changed files with 29 additions and 10 deletions

BIN
gimp/plus-child.xcf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

View File

@ -47,6 +47,8 @@ namespace zaaReloaded2.ViewModels
}
}
public override string ToolTip { get { return Element.Label; } }
#endregion
#region Constructors

View File

@ -39,6 +39,8 @@ namespace zaaReloaded2.ViewModels
get { return Element.Label; }
}
public abstract string ToolTip { get; }
#endregion
#region Constructors

View File

@ -46,6 +46,8 @@ namespace zaaReloaded2.ViewModels
/// </summary>
public ControlElementViewModel Parent { get; set; }
public override string ToolTip { get { return Element.Label; } }
#endregion
#region Commands

View File

@ -60,29 +60,39 @@
x:Name="ReferenceStyleChooser" HorizontalAlignment="Stretch" />
</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"
Width="{Binding ElementName=NewElementButton,Path=ActualWidth}"/>
<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">
<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 DeleteElementCommand}" Content="Entfernen" Margin="0 0 0 10" />
<Button Command="{Binding AddElementCommand}" ToolTip="Neues Element" Margin="0 0 0 10">
<Image Source="/zaaReloaded2;component/Icons/plus.png" Width="24" />
</Button>
<Button Command="{Binding AddChildElementCommand}" ToolTip="Neues Kindelement" Margin="0 0 0 10">
<Image Source="/zaaReloaded2;component/Icons/plus-child.png" Width="24" />
</Button>
<Button Command="{Binding DeleteElementCommand}" ToolTip="Entfernen" Margin="0 0 0 10">
<Image Source="/zaaReloaded2;component/Icons/minus.png" Width="24" />
</Button>
<Button Command="{Binding EditElementCommand}" IsDefault="True" ToolTip="Bearbeiten" Margin="0 0 0 10">
<Image Source="/zaaReloaded2;component/Icons/pen.png" Width="24" />
</Button>
<Button Command="{Binding CopyElementCommand}" ToolTip="Kopieren" Margin="0 0 0 10">
<Image Source="/zaaReloaded2;component/Icons/duplicate.png" Width="24" />
</Button>
</StackPanel>
<TreeView ItemsSource="{Binding Elements}">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<!--<Setter Property="IsExpanded" Value="True" />-->
<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}" />
<TextBlock Text="{Binding DisplayString}" ToolTip="{Binding ToolTip}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>

View File

@ -398,6 +398,9 @@
<ItemGroup>
<Resource Include="Icons\exit.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\plus-child.png" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>