开发者

moonlight vs. silverlight :: datagrid incompatibility?

开发者 https://www.devze.com 2023-04-12 06:13 出处:网络
I\'m trying to develop an application in moonlight. Now I\'m trying to use a DataGrid to show some data.

I'm trying to develop an application in moonlight. Now I'm trying to use a DataGrid to show some data.

In an old silverlight project I used a DataGrid in this way:

<UserControl x:Class="One.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data">
    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel Orientation="Vertical">
            <TextBlock x:Name="lbl1">lblInfo1</TextBlock>
            <TextBlock x:Name="lbl2">lblInfo2</TextBlock>
            <TextBox x:Name="txt1">Write here</TextBox>
            <Button x:Name="btn1" Content="Send" Click="btn1_Click" />
            <my:DataGrid x:Name="grData"
                        Grid.Row="1"
                        Width="500" Height="250"
                        Margin="10"
                        AutoGenerateColumns="False">

                    <my:DataGrid.Columns>
                        <my:DataGridTextColumn Header="Código" />
                        <my:DataGridTextColumn Header="Lote" />
                        <my:DataGridTextColumn Header="Ciudad" /&开发者_开发问答gt;
                        <my:DataGridTextColumn Header="País" />
                    </my:DataGrid.Columns>

            </my:DataGrid>
        </StackPanel>
    </Grid>
</UserControl>

but if I use the same code in my new moonlight project I get an empty page. I've been looking for some examples and I found a simple one:

  • http://geeks.ms/blogs/lmblanco/archive/2008/09/02/silverlight-datagrid-crear-una-columna-a-partir-de-varios-valores.aspx

Is this example the writer use the DartaGrid in the same way than me. Can anyone explain me why in VS2010 I can use this code and In monodevelop 2.4 or monodevelop 2.8 I can't?


According to some research on Google, it looks like your project needs additional dependencies and MonoDevelop isn't notifying you: http://mono.1490590.n4.nabble.com/Moonlight-datagrid-support-td1836948.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号