Просмотр исходного кода

编辑器简单布局,可以左右拖动listbox

tanghai 14 лет назад
Родитель
Сommit
329b6f29c2
2 измененных файлов с 16 добавлено и 9 удалено
  1. 3 3
      CSharp/GameEditor/App.xaml
  2. 13 6
      CSharp/GameEditor/MainWindow.xaml

+ 3 - 3
CSharp/GameEditor/App.xaml

@@ -2,7 +2,7 @@
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              StartupUri="MainWindow.xaml">
-    <Application.Resources>
-         
-    </Application.Resources>
+	<Application.Resources>
+
+	</Application.Resources>
 </Application>

+ 13 - 6
CSharp/GameEditor/MainWindow.xaml

@@ -1,10 +1,17 @@
 <Window x:Class="GameEditor.MainWindow"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        Title="MainWindow" Height="768" Width="1024">
-	<DockPanel Height="720" Name="dockPanel1" Width="1000" LastChildFill="False">
-		<Menu Name="menu1" DockPanel.Dock="Top" Height="25" />
-		<ListView Name="listView1" Width="150" />
-		<ScrollBar Name="scrollBar1" Width="18" DockPanel.Dock="Right" />
-	</DockPanel>
+        Title="MainWindow" Height="800" Width="1280">
+	<StackPanel Name="stackPanel1">
+		<Menu Height="23" Name="menu1" />
+		<Grid Name="grid1" Height="738" Width="Auto">
+			<Grid.ColumnDefinitions>
+				<ColumnDefinition Width="132*" />
+				<ColumnDefinition Width="Auto" />
+				<ColumnDefinition Width="1092*" />
+			</Grid.ColumnDefinitions>
+			<ListBox HorizontalAlignment="Stretch" Margin="0" Name="listBox1" VerticalAlignment="Stretch" />
+			<GridSplitter Grid.Column="1" HorizontalAlignment="Center" Margin="0" Name="gridSplitter1" VerticalAlignment="Stretch" Width="5" />
+		</Grid>
+	</StackPanel>
 </Window>