(Error) Layout measurement override of element ...

3 posts, 1 answers
  1. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 02 Jul 2011 Link to this post

    When adding a new DataFormComboBoxField
    to my DataForm i get an error:


    Layout measurement override of element 'Microsoft.Windows.Design.Platform.SilverlightViewProducer+SilverlightContentHost' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size.

    This is in my ReadOnlyTemplate
    I have the same element in my EditTemplate

    The app works just fine but i cannot see the design as long as the elements is in there.

    Here is the code:

                                        <telerik:DataFormDataField DataMemberBinding="{Binding Details.Name,Mode=OneTime}" Label="Client Name:" IsEnabled="False" />
                                        <telerik:DataFormDataField DataMemberBinding="{Binding Details.Description,Mode=OneTime}" Label="Description:" IsEnabled="False"/>
                                        <telerik:DataFormDataField DataMemberBinding="{Binding WebSite,Mode=OneTime}" Label="Web Site:" IsEnabled="False"/>
                                        <telerik:DataFormDataField DataMemberBinding="{Binding Details.Notes,Mode=OneTime}" Label="Notes:" IsEnabled="False" />
                                        <telerik:DataFormComboBoxField DataMemberBinding="{Binding VisibilityTypeId,Mode=TwoWay}" Label="Visibility:" DisplayMemberPath="Name" SelectedValuePath="Id" ItemsSource="{Binding Source={StaticResource Clients_VM}, Path=VisibilityTypes}" IsEnabled="False"/>
                                        <telerik:DataFormDataField DataMemberBinding="{Binding Core.StateFlag,Mode=OneTime}" Label="State Flag:" IsEnabled="False"/>
                                        <telerik:DataFormDataField DataMemberBinding="{Binding Core.Position,Mode=OneTime}" Label="Position:" IsEnabled="False"/>
                                        <telerik:DataFormComboBoxField DataMemberBinding="{Binding UserId,Mode=TwoWay}" Label="Owner:" DisplayMemberPath="UserGuid" SelectedValuePath="Id" ItemsSource="{Binding Source={StaticResource Clients_VM}, Path=Users}" IsEnabled="False"/>

    it's the last element in the list.
  2. Answer
    Vlad avatar
    11100 posts

    Posted 04 Jul 2011 Link to this post


     Can you change StackPanel in your DataTemplate to Grid to see what will be the result? 

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 04 Jul 2011 Link to this post

    Thanks Vlad.

    I am afraid i was a bit impatient and changed the whole design completely to avoid the error.

    Now I am using the RadDataForm inside a RadGridView, using it this way does not give me the error.

    I am most likely to use the DataForm the other way quite soon and if I encounter the error again I will try it with a grid rather than a stackpanel.

Back to Top