2012-05-06 44 views
4

我正在研究一个应用程序,试图去掌握Windows 8.我想为我的XAML表单添加一个GridSplitter,但该控件似乎不可用。WinRT中的GridSplitter在哪里?

的XAML我已经是

<Page 
    x:Class="TweetiCon.BlankPage" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="using:TweetiCon"> 

    <Grid Background="{StaticResource ApplicationPageBackgroundBrush}"> 
     <Grid.ColumnDefinitions> 
      <ColumnDefinition/> 
      <ColumnDefinition Width="auto"/> 
      <ColumnDefinition/> 
     </Grid.ColumnDefinitions> 
     <GridSplitter Grid.Column="1" Orientation="Vertical"/> 
    </Grid> 
</Page> 

GridSpliter因素导致的应用程序不请编译,因为

名称GridSplitter不会在命名空间中http://schemas.microsoft.com/winfx/2006/xaml/presentation

但我很确定它确实。这正是在正常的WPF应用程序中。

我在做什么错?

回答

1

从这个博客post

有在Windows Phone或WinRT中没有GridSplitter。我检查了MinWidth/MaxWidth在具有可变大小内容的Width =“Auto”列上做了哪些操作(在Windows Phone和WinRT中),看起来好像MinWidth确实能够保持列的给定大小一样 - 列的确超越了MaxWidth,尽管文档中提到:“MinWidth值优先于MaxWidth值,而MaxWidth优先于宽度值”。

“文档” 开始称这是MSDN page

+0

谢谢! *诅咒微软* –

3

RE:有在Windows Phone或WinRT中没有GridSplitter

的确但到现在为止...
如果”重新搜索一个GridSplitter,你可以看看CodeRlex上的WinRT.Xaml.Toolkit 。

http://winrtxamltoolkit.codeplex.com/

,寻找CustomGridSplitter控制。

我已经测试了WinRT [无论是在RP和RTM]版本的代码,它做的工作。
您可以试试;)

+1

你有没有机会参与这个项目? –