C# WPF Dynaically adding tabs byt loading xaml file clears radio buttons, why?

Let's assume you have 3 groups of radio buttons on your URLTabContentControl control titled Group1, Group2, and Group3. When you dynamically create a TabItem based on URLTabContentControl that instance then has yet another group of radio buttons that have since expanded on your initial group definitions. Those 3 groups are not isolated to each instance per se One way to test this theory is to leave a single grouping of radio buttons on your URLTabContentControl control and remove the group name and let the framework handle the default behavior; it should work as expected now since there is no explicit group name tied to the radio buttons on URLTabContentControl.

Let's assume you have 3 groups of radio buttons on your URLTabContentControl control titled Group1, Group2, and Group3. When you dynamically create a TabItem based on URLTabContentControl that instance then has yet another group of radio buttons that have since expanded on your initial group definitions. Those 3 groups are not isolated to each instance per se.

One way to test this theory is to leave a single grouping of radio buttons on your URLTabContentControl control and remove the group name and let the framework handle the default behavior; it should work as expected now since there is no explicit group name tied to the radio buttons on URLTabContentControl.

Thanks a ton Aaron, I would never have thought of that. LOL. I now dynamically set the radio button group names each time a new tab is loaded and that fixed the issue.

I'd vote up on your answer but I'm new and don't have the rep points yet. – Scott Dec 26 '10 at 5:51 @Scott No problem, glad to have helped... – Aaron McIver Dec 26 '10 at 22:51.

Label Content="Filename Prefix:" Grid. Row="2" Height="28" HorizontalAlignment="Right" Margin="0,10,0,0" Name="filenamePrefixLabel" VerticalAlignment="Top" Width="95" ToolTip="Enter the front part of the file names used for capture file by this video source. Row="2" Height="23" HorizontalAlignment="Left" Margin="6,12,0,0" Name="filenamePrefixTextBox" VerticalAlignment="Top" Width="120" Text="capture" Grid.

Row="2" Height="16" HorizontalAlignment="Left" Margin="9,15,0,0" Name="filenameZeroPadCheckBox" VerticalAlignment="Top" ToolTip="Example prefix00001. Row="4" Height="16" HorizontalAlignment="Left" Margin="6,11,0,0" Name="captureDimensionsDefaultRadioButton" VerticalAlignment="Top" Width="94" GroupName="captureDimensions" IsChecked="True" ToolTip="The default capture size for the selected video source." Row="4" Height="16" HorizontalAlignment="Left" Margin="8,11,0,0" Name="captureDimensionsSourceReportedRadioButton" VerticalAlignment="Top" GroupName="captureDimensions" ToolTip="Select a mode from one reported by the device.".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions