首页新闻找找看学习计划

ItemsControl 中如何绑定 window??

0
悬赏园豆:20 [待解决问题]
      <Grid   Height="628" Width="758"  Name="grid1" VerticalAlignment="Top">
            <ItemsControl x:Name="_board" ItemsSource="{Binding VideoList}" Margin="0">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <UniformGrid  Columns="{Binding ColumnsCount}"   />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="Blue" Margin="0" BorderThickness="1">
                            <Grid>
                            
                                <my:MainWindow></my:MainWindow>这个地方报错 :无法将Window放入Style
                            </Grid>
                        </Border>
                        <DataTemplate.Triggers>
                            <DataTrigger Binding="{Binding}" Value="Empty">
                                <Setter Property="Opacity" Value="0"  />
                            </DataTrigger>
                        </DataTemplate.Triggers>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </Grid>
大家有知道  <DataTemplate>
  中怎么放入window吗????? 
痞子朱的主页 痞子朱 | 初学一级 | 园豆:8
提问于:2012-03-13 13:47
< >
分享
所有回答(2)
0

写代码实例化后放进去

OOLi | 园豆:163 (初学一级) | 2012-03-13 13:51

界面层怎么实例化?

支持(0) 反对(0) 痞子朱 | 园豆:8 (初学一级) | 2012-03-13 13:53

@霹雳猪猪: 

http://topic.csdn.net/u/20081112/11/3b7fd386-d736-4afa-82a4-eb8927a9340d.html

      Control u=LoadControl("~/myControls/abc.ascx");    

     PlaceHolder1.Controls.Add(u);    

((MyABCInterface)u).Data=1234;

支持(0) 反对(0) OOLi | 园豆:163 (初学一级) | 2012-03-13 22:04

@OOLi: 贴的这个方法还是添加Controls  ,我需要的是绑定WIndow

支持(0) 反对(0) 痞子朱 | 园豆:8 (初学一级) | 2012-03-14 11:13
0

貌似只能usercontrol

Lee's Blog | 园豆:530 (小虾三级) | 2012-03-27 00:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册