2010-12-13 3 views
1

저는 WPF 로의 진출로 WPF 애플리케이션을 만들고 있습니다. 시작하는 방법에 조금 얽혀 있습니다. 상단에 메뉴 모음이있는 메인 프로그램 창을 만들고 그 바로 아래에 버튼 막대가있는 '표준'방식은 무엇입니까? 그러면 내 앱이있는 큰 열린 공간이 생깁니 까? StackPanel, Canvas, Grid입니까? Window에 직접 배치 되었습니까? 시작하려면 어떻게해야합니까?WPF에서 도구 모음과 도구 모음으로 기본 창을 가져 오는 데 사용할 수있는 방법은 무엇입니까?

답변

2

나는이 같은 메뉴와 그리드 및 도구 모음에 선호 :

<Window x:Class="WpfApplication1.MainWindow" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     x:Name="self" 
     Title="MainWindow" Height="350" Width="525"> 
    <Grid> 
     <Grid.RowDefinitions> 
      <RowDefinition Height="Auto" /> 
      <RowDefinition Height="Auto" /> 
      <RowDefinition Height="*" /> 
     </Grid.RowDefinitions> 
     <Menu Grid.Row="0"> 
      <MenuItem Header="File"> 
       <MenuItem Header="Open" /> 
       <MenuItem Header="Close" /> 
      </MenuItem> 
     </Menu> 
     <ToolBar Grid.Row="1"> 
      <Button Content="Foo" /> 
      <Button Content="Bar" /> 
     </ToolBar> 
    </Grid> 
</Window> 
관련 문제