Add transition to dynamically created object-Collection of common programming errors

I would like to assign a transition to a dynamically created button, but it didn’t happen.

Button btn = new Button();
Grid.SetRow(btn, j);
Grid.SetColumn(btn, i);
btn.Transitions.Add(new Windows.UI.Xaml.Media.Animation.RepositionThemeTransition());                    
myGrig.Children.Add(btn);

I get a runtime errror, a NullReference exception, on the btn.Transition… line. Object reference not set to an instance of an object.

How can I solve this?