Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 653193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:21:17+00:00 2026-05-13T22:21:17+00:00

When I run the following Silverlight app, it gives me the error : AG_E_PARSER_BAD_PROPERTY_VALUE

  • 0

When I run the following Silverlight app, it gives me the error:

AG_E_PARSER_BAD_PROPERTY_VALUE [Line:
12 Position: 35]

I’ve tried the same code in WPF and it runs fine, i.e. the middle grid row correctly resizes based on the bound value.

What do I have to change in this code to avoid this error in Silverlight?

XAML:

<UserControl x:Class="TestRowHeight222.MainPage"
    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:DesignWidth="640" d:DesignHeight="480">
  <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="{Binding ContentHeight}"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Background="Tan">
            <TextBlock Text="row0" />
        </StackPanel>

        <StackPanel Grid.Row="1" Background="Beige" Orientation="Horizontal">
            <TextBlock Text="The height should be: "/>
            <TextBlock Text="{Binding ContentHeight}"/>
        </StackPanel>

        <StackPanel Grid.Row="2" Background="Tan">
            <TextBlock Text="row2"/>
        </StackPanel>
  </Grid>
</UserControl>

Code Behind:

using System.Windows.Controls;
using System.ComponentModel;

namespace TestRowHeight222
{
    public partial class MainPage : UserControl, INotifyPropertyChanged
    {
        #region ViewModelProperty: ContentHeight
        private int _contentHeight;
        public int ContentHeight
        {
            get
            {
                return _contentHeight;
            }

            set
            {
                _contentHeight = value;
                OnPropertyChanged("ContentHeight");
            }
        }
        #endregion

        public MainPage()
        {
            InitializeComponent();
            DataContext = this;
            ContentHeight = 50;
        }

        #region INotifiedProperty Block
        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;

            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:21:17+00:00Added an answer on May 13, 2026 at 10:21 pm

    This is as close as I can get, I don’t know if it’s suitable to your situation.

    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
    
        <StackPanel Grid.Row="0" Background="Tan">
            <TextBlock Text="row0" />
        </StackPanel>
    
        <Grid Grid.Row="1" Height="{Binding ContentHeight}">
            <StackPanel  Background="Beige" Orientation="Horizontal">
                <TextBlock Text="The height should be: "/>
                <TextBlock Text="{Binding ContentHeight}"/>
            </StackPanel>
        </Grid>
    
        <StackPanel Grid.Row="2" Background="Tan">
            <TextBlock Text="row2"/>
        </StackPanel>
    </Grid>
    

    Also change your ContentHeight property to a double.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I run the following code to test copying a directory, I get a
I want to run the following code: ajaxUpdate(10); With a delay of 1 second
When I try to run the following code (from the REPL) in Clojure: (dotimes
Why whenever I compile and run the following code in Visual Studio 2008: double
When I run the following, PowerShell hangs waiting for the dialog to close, even
If I run the following query in SQL Server 2000 Query Analyzer: BULK INSERT
When I run the following test in Gallio's Icarus it passes, but when I
How do I run the following WMI query, both programmatically to and as a
I'm trying to run the following commands: replace -x must A2input.txt replace -x a
I'm trying to run the following command: find . -iname '.#*' -print0 | xargs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.