This question is locked. New answers and comments are not allowed.
Hi,
since search frustrates a bit I open a new thread.
First about search - ClearSelectionButtonVisibility finds one thread ClearSelectionButtonContent another one.
ClearSelectionButton - finds nothing!!! I love this^^ either I luckily enter the "perfect matching text" or I find nothing.
Anyhow - my problem (documentation doesn't even show something about this button) is that the button doesn't close the dropdown.
Scenario: the user can select an image and he should be able to select no image.
I did this with ClearSelectionButton... - and so far it works.
BUT - the dropdown stays open after I click this button.
When I select an item CB closes (as expected) which is OK.
But after the user selects "No image" (the ClearSelectionButton) he has to find a way to close the dropdown.
Since I build a silverlight application there is no code behind or something like this in the control where I use the CB.
The control is used in a (dynamic) template inside a templated control and the rest is done via databinding.
Next - I use a combobox near the bottom of my control. Of course the "dropdown" has to go upside.
What it does is:
a.) it still goes "down"
b.) it comes from the middle of my form (where later the top position will be)
c.) the "clear selected" button is on top of the dropdown - not near the combobox where I expect it.
f.) (the best) if there is not enough space above it drops over the combobox...
I also found no way to tell the combobox it's preferred drop-direction.
Here a simple page showing all the described "funny" things:
http://iphone.pp-p.net/ViewSettings.aspx
And here the markup
Regards
Manfred
since search frustrates a bit I open a new thread.
First about search - ClearSelectionButtonVisibility finds one thread ClearSelectionButtonContent another one.
ClearSelectionButton - finds nothing!!! I love this^^ either I luckily enter the "perfect matching text" or I find nothing.
Anyhow - my problem (documentation doesn't even show something about this button) is that the button doesn't close the dropdown.
Scenario: the user can select an image and he should be able to select no image.
I did this with ClearSelectionButton... - and so far it works.
BUT - the dropdown stays open after I click this button.
When I select an item CB closes (as expected) which is OK.
But after the user selects "No image" (the ClearSelectionButton) he has to find a way to close the dropdown.
Since I build a silverlight application there is no code behind or something like this in the control where I use the CB.
The control is used in a (dynamic) template inside a templated control and the rest is done via databinding.
Next - I use a combobox near the bottom of my control. Of course the "dropdown" has to go upside.
What it does is:
a.) it still goes "down"
b.) it comes from the middle of my form (where later the top position will be)
c.) the "clear selected" button is on top of the dropdown - not near the combobox where I expect it.
f.) (the best) if there is not enough space above it drops over the combobox...
I also found no way to tell the combobox it's preferred drop-direction.
Here a simple page showing all the described "funny" things:
http://iphone.pp-p.net/ViewSettings.aspx
And here the markup
Snippet created with CBEnhancer
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<DataTemplate x:Key="cbInner">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="310"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Image Width="240" Height="307" Source="{Binding TheImage}"/>
<TextBlock Grid.Row="1" Text="{Binding ImageName}" HorizontalAlignment="Stretch"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="cbSelect">
<TextBlock Text="{Binding ImageName}"/>
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="580"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" >
<StackPanel HorizontalAlignment="Left">
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
<Rectangle Height="226" Fill="Red"/>
<Rectangle Height="326" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" >
<StackPanel HorizontalAlignment="Left">
<Rectangle Height="126" Fill="Red"/>
<Rectangle Height="126" Fill="Red"/>
<Rectangle Height="126" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
<Rectangle Height="200" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
</StackPanel>
</StackPanel>
</Grid>
<Grid x:Name="LayoutRoot">
<Grid.Resources>
<DataTemplate x:Key="cbInner">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="310"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Image Width="240" Height="307" Source="{Binding TheImage}"/>
<TextBlock Grid.Row="1" Text="{Binding ImageName}" HorizontalAlignment="Stretch"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="cbSelect">
<TextBlock Text="{Binding ImageName}"/>
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="580"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" >
<StackPanel HorizontalAlignment="Left">
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
<Rectangle Height="226" Fill="Red"/>
<Rectangle Height="326" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" >
<StackPanel HorizontalAlignment="Left">
<Rectangle Height="126" Fill="Red"/>
<Rectangle Height="126" Fill="Red"/>
<Rectangle Height="126" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
<Rectangle Height="200" Fill="Red"/>
<telerikInput:RadComboBox SelectionBoxItemTemplate="{StaticResource cbSelect}" ItemTemplate="{StaticResource cbInner}" ItemsSource="{Binding BKGImages, Source={StaticResource bkgHolder}}" Height="25" Width="320" HorizontalAlignment="Center" MaxDropDownHeight="400" ClearSelectionButtonContent="No Image" ClearSelectionButtonVisibility="Visible"/>
</StackPanel>
</StackPanel>
</Grid>
Regards
Manfred