AG_E_PARSER_PROPERTY_NOT_FOUND exception.
Posted
by Subhen
on Stack Overflow
See other posts from Stack Overflow
or by Subhen
Published on 2010-04-10T09:57:37Z
Indexed on
2010/04/10
10:03 UTC
Read the original article
Hit count: 426
Hi , Can any one plese explain why this error is happenin?
I have created a usercontrol in another class and
public partial class userControlImageFolder : RadioButton
{
public userControlImageFolder()
{
InitializeComponent();
}
}
Now in XAML it is a lot of code created by the designer like below:
<UserControl x:Class="userControlFolder.userControlLocalFolder"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Height="120" Width="150">
<UserControl.Resources>
<Style x:Key="rdbfolder" TargetType="RadioButton">
<Setter Property="Background" Value="#FF448DCA"/>
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="Padding" Value="4,1,0,0"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Pressed"/>
<VisualState x:Name="Disabled"/>
</VisualStateGroup>
<VisualStateGroup x:Name="CheckStates">
<VisualState x:Name="Checked">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path3" Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path4" Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Unchecked"/>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused"/>
<VisualState x:Name="Unfocused"/>
</VisualStateGroup>
<VisualStateGroup x:Name="ValidationStates">
<VisualState x:Name="Valid"/>
<VisualState x:Name="InvalidUnfocused"/>
<VisualState x:Name="InvalidFocused"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="125"/>
</Grid.ColumnDefinitions>
<Path x:Name="path1" Stroke="#FFEFCD44" Width="Auto" Data="F1M12,1.087C12,1.087 28.814,1.087 49.294,1.087 53.671,1.087 58.215,13 62.799,13 91.625,13 122,13 122,13 127.523,13 132,17.477 132,23 132,23 132,98 132,98 132,103.523 127.523,108 122,108 122,108 12,108 12,108 6.477,108 2,103.523 2,98 2,98 2,12.337 2,12.337 2,6.815 6.477,1.087 12,1.087z" HorizontalAlignment="Stretch" Margin="0,1.765,-7.564,0" VerticalAlignment="Top" Height="108.5" UseLayoutRounding="False" d:LayoutOverrides="Width">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5B802" Offset="0.996"/>
<GradientStop Color="#FFFFF3C1" Offset="0.009"/>
<GradientStop Color="#FFC1A11F" Offset="0.16"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path x:Name="path2" Stretch="Fill" Width="Auto" Data="M47.476928,130.65616 C47.476928,130.65616 167.10104,89.928686 175.76116,103.61726 L175.20267,155.29888 C175.20267,155.29888 46.697497,161.72468 46.697497,161.72468 46.697497,161.72468 47.476928,130.65616 47.476928,130.65616 z" HorizontalAlignment="Stretch" Margin="2.5,38.07,-6.564,0" VerticalAlignment="Top" Height="61.919" UseLayoutRounding="False">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5B802" Offset="1"/>
<GradientStop Color="#FFECC31C"/>
<GradientStop Color="#FFE7C536" Offset="0.591"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path x:Name="path1_Copy" Stroke="#FFEFCD44" Width="Auto" Data="F1 M120.50496,0.49999992 C126.02796,0.49999992 130.50496,4.9769999 130.50496,10.5 130.50496,10.5 130.50496,76.333333 130.50496,76.333333 130.50496,81.856333 126.02796,86.333333 120.50496,86.333333 120.50496,86.333333 10.504963,86.333333 10.504963,86.333333 4.9819634,86.333333 0.5049634,81.856333 0.5049634,76.333333 0.5049634,76.333333 0.5049634,12.040168 0.5049634,12.040168 0.33018858,5.8202529 4.7881744,0.99969011 11.184806,0.94185195 39.903021,0.68218267 120.50496,0.49999992
120.50496,0.49999992 z" HorizontalAlignment="Stretch" Margin="1.497,23.434,-7.502,0" VerticalAlignment="Top" Height="86.833" UseLayoutRounding="False">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5B802" Offset="0.996"/>
<GradientStop Color="#FFFFFB9D" Offset="0.009"/>
<GradientStop Color="#FFF1D256" Offset="0.164"/>
<GradientStop Color="#FFE2BC22" Offset="0.505"/>
<GradientStop Color="#FFB5780F" Offset="0.948"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path x:Name="path3" Stroke="#FFEFCD44" Width="133" Data="F1M12,1.087C12,1.087 28.814,1.087 49.294,1.087 53.671,1.087 58.215,13 62.799,13 91.625,13 122,13 122,13 127.523,13 132,17.477 132,23 132,23 132,98 132,98 132,103.523 127.523,108 122,108 122,108 12,108 12,108 6.477,108 2,103.523 2,98 2,98 2,12.337 2,12.337 2,6.815 6.477,1.087 12,1.087z" HorizontalAlignment="Right" Margin="0,1.719,-8,0" VerticalAlignment="Top" Height="108.5" Opacity="0" UseLayoutRounding="False">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF6A5603" Offset="1"/>
<GradientStop Color="#FFF3EFDE"/>
<GradientStop Color="#FFDAB20D" Offset="0.349"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
<Path x:Name="path4" Width="150" Data="F1 M30,0 C30,0 140,0 140,0 145.523,0 150,4.477 150,10 150,10 130,55 130,55 130,55 124.65027,67.742768 120,65 120,65 10,65 10,65 4.477,65 0,60.523 0,55 0,55 20,10 20,10 22.247647,3.2935648 24.477,0
30,0 z" HorizontalAlignment="Right" Margin="0,43.379,-31.05,0" VerticalAlignment="Top" Height="65.387" Opacity="0" UseLayoutRounding="False">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5B802" Offset="1"/>
<GradientStop Color="White"/>
<GradientStop Color="#FFFAD336" Offset="0.378"/>
</LinearGradientBrush>
</Path.Fill>
</Path>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<RadioButton HorizontalAlignment="Left" Style="{StaticResource rdbfolder}" VerticalAlignment="Top" Content="RadioButton" Height="120" Width="150"/>
</Grid>
</UserControl>
I am sorry for pasting the whole code but this is might be the only way can help us.
I create a dll out of it and uses in my other projects:
using userControlFolder;
userControlLocalFolder btnLocalFolder = new userControlLocalFolder();
Canvas.SetTop(btnLocalFolder, 100);
gridRoot.Children.Add(btnLocalFolder);
So while running it I get the above exception, AG_E_PARSER_PROPERTY_NOT_FOUND,
Please help.
Thanks, Subhen
© Stack Overflow or respective owner