285 // store a list of radio buttons in the value |
285 // store a list of radio buttons in the value |
286 CxList* radioButtons = (CxList*) (value->obj ? value->obj : cxLinkedListCreate(current->ctx->allocator, NULL, CX_STORE_POINTERS)); |
286 CxList* radioButtons = (CxList*) (value->obj ? value->obj : cxLinkedListCreate(current->ctx->allocator, NULL, CX_STORE_POINTERS)); |
287 // get or create the group name |
287 // get or create the group name |
288 static int groupCount = 0; |
288 static int groupCount = 0; |
289 winrt::hstring groupName; |
289 winrt::hstring groupName; |
290 if (radioButtons->size == 0) { |
290 if (cxListSize(radioButtons) == 0) { |
291 groupName = winrt::to_hstring(groupCount++); |
291 groupName = winrt::to_hstring(groupCount++); |
292 } else { |
292 } else { |
293 UiWidget* firstButtonWidget = (UiWidget*)cxListAt(radioButtons, 0); |
293 UiWidget* firstButtonWidget = (UiWidget*)cxListAt(radioButtons, 0); |
294 RadioButton firstRadioButton = firstButtonWidget->uielement.as<RadioButton>(); |
294 RadioButton firstRadioButton = firstButtonWidget->uielement.as<RadioButton>(); |
295 groupName = firstRadioButton.GroupName(); |
295 groupName = firstRadioButton.GroupName(); |