我有 Gridview:
<GridView.ItemTemplate>
<DataTemplate>
<Grid Height="410" Width="410" Background="Transparent">
<StackPanel>
<TextBlock Text="{Binding Name}"/>
<UserControl Content="{Binding Control}"/>
</StackPanel>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
以及获取数据的代码:
public class Trend
{
public string Query { get; set; }
public string Name { get; set; }
public UIElement Control = new MyUserControl1();
}
Textblock 显示一些文本,但用户控件不起作用。我究竟做错了什么?