@inherits ButtonBaseComponent<RadioButtonControl>

<div style="@GetStyle">
    <input style="vertical-align:middle;width:@(WebReport.Dialog.Zoom(10))px;border:none;padding:0;margin:0 5px 0 0;"
           type="radio"
           id="@Control.Name"
           name="RadioGroup@(Control.RadioButton.Parent.GetHashCode())"
           value="@Control.Text"
           checked="@Control.Checked"
           disabled="@IsDisabled"
           @onclick="Clicked"/>
    <label style="@GetControlFont()" for="@Control.Name">@Control.Text</label>
</div>

@code {

    private void Clicked()
    {
        RadioButtonClick();

        Refresh();
    }

    private void RadioButtonClick()
    {
        bool oldValue = Control.Checked;
        Control.Checked = true;
        Control.FilterData();
        Control.OnClick(null);
        if (oldValue != Control.Checked)
            Control.OnCheckedChanged(EventArgs.Empty);
    }

}
