whenever I try to add a tileSlider to a grid, an NRE is caused. I can't explain why, hopefully someone of you can help me with that.
EDIT2: tileSlider is a custom control provided here: http://tileslider.codeplex.com/ I tried to use it in my app and failed to implement it in c#-code behind.
code:
private void addNormalTiles()
{
foreach (KeyValuePair<TileSlider, int[]> slider in (App.Current as App).normalTiles)
{
TileSlider x = slider.Key;
x.Size = 228;
Grid.SetColumnSpan(x, 2);
Grid.SetRowSpan(x, 2);
Grid.SetRow(x, slider.Value[0]);
Grid.SetColumn(x, slider.Value[1]);
ContentPanel.Children.Add(x);
}
}
thanks
EDIT:
System.NullReferenceException wurde nicht behandelt.
Message=NullReferenceException StackTrace: at
ScottIsAFool.Controls.TileSlider.TileSlider_Loaded(Object sender, RoutedEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate
handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs,
Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)