Hi
I got a very simple user control (visifire charts + datepickers and some radiobuttons to control filtering etc)
<GroupBox Header="Scale" Width="159" HorizontalAlignment="Left" Margin="10,47,0,0" Height="38" VerticalAlignment="Top" Name="scalingBox">
<Canvas Height="16">
<RadioButton Name="scaleDays" Content="Days" GroupName="g2" Width="47" IsChecked="True" Checked="scale_Change"></RadioButton>
<RadioButton Name="scaleHours" Content="Hours" GroupName="g2" Canvas.Left="60" Width="59" Checked="scale_Change"></RadioButton>
</Canvas>
</GroupBox>
First bit is that setting IsChecked to true on the first button doesn't do anything when the control is displayed.
Searching for a workaround I exposed some public methods to check the buttons I want from the parent window, but when I have more than one MyControl calling these methods only checks the buttons on one instance where the methods was last called. like this:
myControl1.SetDefaultScale();
myControl2.SetDefaultScale();
only checks the buttons on myControl2, leaving all the buttons in the group unchecked on myControl1
Any ideas what may be causing this?
thanks jkg
And yes, it was the group name that got shared among all the controls... Thanks Aran