2013-10-22 56 views
0

我想建立一个WPF控件,就像自定义WPF列表控制

enter image description here

这是Outlook导航的一部分。

我不确定天气使用选项卡控件还是列表控件。

如果您也可以参考样品,那将会非常有帮助。

由于事先 KD

+2

您不必从头开始构建自己的控制来实现这一目标。你可以使用这个项目:http://navigationpane.codeplex.com。 – kmatyaszek

+0

听起来像你可以用标准的WPF机制来做到这一点,比如ItemTemplate,GroupStyle和CollectionView。 –

+0

这和'Expander'有什么区别? – Shoe

回答

0

查找到Expander控制。这是一个可折叠的内容面板,您可以点击标题展开或折叠内容。

这应该给你一些你的“当前视图”窗口上方的面板:

<Border BorderThickness="0,0,0,2" BorderBrush="LightBlue" > 
    <Expander IsExpanded="True" Name="expander" Background="#FFB5E1F3"> 
     <Expander.Header> 
      <TextBlock Text="Current View" Background="#FFB5E1F3" Foreground="#FF166CD3" FontWeight="Bold" Padding="4,1,75,1"/> 
     </Expander.Header> 
     <Expander.Content> 
      <Grid Background="White"> 
       <StackPanel Margin="20,0,0,0"> 
        <RadioButton Content="Business Cards" Margin="2"/> 
        <RadioButton Content="Address Cards" Margin="2"/> 
        <RadioButton Content="Phone List" Margin="2"/> 
       </StackPanel> 
      </Grid> 
     </Expander.Content> 
    </Expander> 
</Border>