This question is locked. New answers and comments are not allowed.
Hello,
I have a RadGallery control with a few items in it.
I want my items to behave like radio buttons from a single group.
Currently if I'm selecting one item and then another, the other one gets unselected, which I like.
However, if I'm selecting one item and then clicking on it again, it gets unselected, similar to checkbox behavior, which I don't like.
In all of your examples, including ones from previous versions, a click on an item that has already been selected, gets ignored, which is the behavior that I want, for example:
The difference between your code and mine is that you're populating your gallery with RadGalleryItems and I'm populating it using ItemsSource and ItemTemplate, My ItemTemplate is similar to this:
Also this doesn't have the desired behavior:
It seems that it only works with items that are inside RadGalleryItem, but I thought that it should happen implicitly.
Hope that someone can help.
Thanks,
Evgeny
I have a RadGallery control with a few items in it.
I want my items to behave like radio buttons from a single group.
Currently if I'm selecting one item and then another, the other one gets unselected, which I like.
However, if I'm selecting one item and then clicking on it again, it gets unselected, similar to checkbox behavior, which I don't like.
In all of your examples, including ones from previous versions, a click on an item that has already been selected, gets ignored, which is the behavior that I want, for example:
<
telerik:RadGallery
ViewportWidth
=
"157"
ViewportHeight
=
"184"
ItemWidth
=
"156"
ItemHeight
=
"26"
>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline1}"
ToolTipService.ToolTip
=
"Underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline2}"
ToolTipService.ToolTip
=
"Double underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline3}"
ToolTipService.ToolTip
=
"Thick underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline4}"
ToolTipService.ToolTip
=
"Dotted underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline5}"
ToolTipService.ToolTip
=
"Dashed underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline6}"
ToolTipService.ToolTip
=
"Dot-dash underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline7}"
ToolTipService.ToolTip
=
"Dot-dot-dash underline"
/>
<
telerik:RadGalleryItem
Image
=
"{Binding Underline8}"
ToolTipService.ToolTip
=
"Wave underline"
/>
</
telerik:RadGallery
>
The difference between your code and mine is that you're populating your gallery with RadGalleryItems and I'm populating it using ItemsSource and ItemTemplate, My ItemTemplate is similar to this:
<
DataTemplate
>
<
StackPanel
>
<
Image
Source
=
"{Binding Image}"
/>
<
TextBlock
Text
=
"{Binding Text}"
/>
</
StackPanel
>
</
DataTemplate
>
Also this doesn't have the desired behavior:
<
telerik:RadGallery
ViewportWidth
=
"157"
ViewportHeight
=
"184"
ItemWidth
=
"156"
ItemHeight
=
"26"
>
<
TextBlock
Text
=
"16253765"
/>
<
TextBlock
Text
=
"16253765"
/>
<
TextBlock
Text
=
"16253765"
/>
<
TextBlock
Text
=
"16253765"
/>
<
TextBlock
Text
=
"16253765"
/>
</
telerik:RadGallery
>
Hope that someone can help.
Thanks,
Evgeny