67 lines
3.3 KiB
XML
67 lines
3.3 KiB
XML
<Window x:Class="S7Explorer.Views.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:local="clr-namespace:S7Explorer" mc:Ignorable="d"
|
|
Title="S7 Project Explorer" Height="600" Width="900">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Toolbar -->
|
|
<Grid Grid.Row="0" Margin="8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Grid.Column="0" Content="Abrir Proyecto" Command="{Binding OpenProjectCommand}" Padding="8,4"
|
|
Margin="0,0,8,0" />
|
|
|
|
<TextBox Grid.Column="1" Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" Padding="4"
|
|
Margin="0,0,8,0" VerticalContentAlignment="Center" KeyDown="SearchBox_KeyDown" />
|
|
|
|
<Button Grid.Column="2" Content="Buscar" Command="{Binding SearchCommand}" Padding="8,4" Margin="0,0,8,0" />
|
|
|
|
<TextBlock Grid.Column="3" Text="{Binding ProjectInfo}" VerticalAlignment="Center" />
|
|
</Grid>
|
|
|
|
<!-- Main Content -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="300" MinWidth="200" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Project Structure TreeView -->
|
|
<TreeView Grid.Column="0" Margin="8,0,0,8" ItemsSource="{Binding ProjectStructure}"
|
|
SelectedItemChanged="TreeView_SelectedItemChanged">
|
|
<TreeView.ItemTemplate>
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="{Binding IconSource}" Width="16" Height="16" Margin="0,0,4,0" />
|
|
<TextBlock Text="{Binding Name}" />
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
</TreeView.ItemTemplate>
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="TreeViewItem">
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
</TreeView>
|
|
|
|
<!-- Splitter -->
|
|
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Center" VerticalAlignment="Stretch" />
|
|
|
|
<!-- Property Grid -->
|
|
<xctk:PropertyGrid Grid.Column="2" Margin="0,0,8,8" SelectedObject="{Binding SelectedObject}"
|
|
AutoGenerateProperties="True" ShowSearchBox="True" ShowSortOptions="True" ShowTitle="True" />
|
|
</Grid>
|
|
</Grid>
|
|
</Window> |