I am using silverlight, My code is set up for a usercontrol as follows:
myxaml.xaml (Just showing the toggle button [line 119])
<ToggleButton x:Name="btnToggleResizeMap" Checked="btnToggleResizeMap_Checked" Unchecked="btnToggleResizeMap_Unchecked" IsChecked="True"/>
codebehind.cs
public partial class MapRadar : UserControl
{
public delegate void OnMapExpandChange(object sender, EventArgs e);
public event OnMapExpandChange Expanded;
public event OnMapExpandChange NotExpanded;
private void btnToggleResizeMap_Checked(object sender, System.Windows.RoutedEventArgs e)
{
NotExpanded(this, null); //If i remove this line, the app runs fine
}
private void btnToggleResizeMap_Unchecked(object sender, System.Windows.RoutedEventArgs e)
{
Expanded(this, null); //If i remove this line, the app runs fine
}
}
Visual studio throws this error before the application is completely loaded:
AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 119 Position: 285]
at:
System.Windows.Application.LoadComponent(this, new System.Uri("/Xormis.Silverlight.ExSys;component/Views/Map/MapRadar.xaml", System.UriKind.Relative));
which is located inside a function named public void InitializeComponent()
I have no idea what is happening here, is there something against having event calls inside another event?