locked
'Windows.UI.Xaml.Markup.XamlParseException' RRS feed

  • Question

  • my error,really wonder what the problem is!!:(I narrowed it down to the "Grid.Row" & "Grid.Column".It seems whenever i seem to apply them , i get the exception.Am currently using visual 2012 ultimate)

    An exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in xapp.exe but was not handled in user code

    WinRT information: Failed to create a 'Windows.Foundation.Int32' from the text ' 2'. [Line: 21 Position: 51]

    Additional information: Unspecified error

    If there is a handler for this exception, the program may be safely continued.

    An error is throw from :

    this.InitializeComponent();

    <Page
        x:Class="xapp.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:xapp"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d">
    
        <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
            <Grid.RowDefinitions>
                <RowDefinition Height="140"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions >
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="2*"/>
                <ColumnDefinition Width="2*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Hello World" Grid.Column=" 2" Grid.Row="1" HorizontalAlignment="Right" Height=" 25" Margin=" 0,45,75,0" Name=" textblock1"/>
            </Grid>
    </Page>


    
    


    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Windows.Foundation;
    using Windows.Foundation.Collections;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Xaml.Data;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Media;
    using Windows.UI.Xaml.Navigation;
    
    // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
    
    namespace xapp
    {
        /// <summary>
        /// An empty page that can be used on its own or navigated to within a Frame.
        /// </summary>
        public sealed partial class MainPage : Page
        {
            public MainPage()
            {
                this.InitializeComponent();
            }
    
            /// <summary>
            /// Invoked when this page is about to be displayed in a Frame.
            /// </summary>
            /// <param name="e">Event data that describes how this page was reached.  The Parameter
            /// property is typically used to configure the page.</param>
            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                
            }
        }
    }






    • Edited by Rodgerskl Saturday, January 4, 2014 5:11 PM
    Saturday, January 4, 2014 4:43 PM

Answers

  • You have an extra space in your prop value. It needs to be "2" not " 2".
    • Proposed as answer by Dave SmitsMVP Sunday, January 5, 2014 12:53 AM
    • Marked as answer by Rodgerskl Sunday, January 5, 2014 5:31 AM
    Saturday, January 4, 2014 6:18 PM
    Moderator

All replies

  • You have an extra space in your prop value. It needs to be "2" not " 2".
    • Proposed as answer by Dave SmitsMVP Sunday, January 5, 2014 12:53 AM
    • Marked as answer by Rodgerskl Sunday, January 5, 2014 5:31 AM
    Saturday, January 4, 2014 6:18 PM
    Moderator
  • Thnx....didn't see that!....
    Saturday, January 4, 2014 6:55 PM