I have create control template in xaml: <ControlTemplate x:Name="temp" x:Key="GBTemplate" TargetType="GroupBox"> at code behind, I have create new Groupbox: GroupBox gb1 gb1=create GroupBox my issue now, I can not apply template on my groupbox in...