This question is locked. New answers and comments are not allowed.
here is my autocomplete radcomobox:
<telerik:RadComboBox
x:Name="EditCompleteBox"
Text="{Binding Model.NearestTown, Mode=TwoWay}"
Tag="{Binding Model.PostalCodeID, Mode=TwoWay}"
DisplayMemberPath="Value"
IsEditable="False"
telerik:TextSearch.TextPath="Value"
TextSearchMode="StartsWith"
CanKeyboardNavigationSelectItems="True"
IsMouseWheelEnabled="True"
SelectionChanged="EditCompleteBox_SelectionChanged"
ItemsSource="{Binding Model.TownList, Mode=TwoWay}"
Width="250" Height="30"
Loaded="EditCompleteBox_Loaded"
StaysOpenOnEdit="True"
OpenDropDownOnFocus="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
>
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/>
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
</telerik:RadComboBox>
its works fine, but my background is not set from my styles:
<Style TargetType="telerik:RadComboBox"
>
<Setter Property="Template" Value="{StaticResource NonEditableComboBox}" />
<Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}" />
<Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="22" />
<Setter Property="Padding" Value="5 0" />
<Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{StaticResource MainColor}"/>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="animation:AnimationManager.AnimationSelector">
<Setter.Value>
<animation:AnimationSelector>
<animation:AnimationGroup AnimationName="Expand">
<animation:SlideAnimation Direction="In" SlideMode="Top" TargetElementName="PopupRoot" />
</animation:AnimationGroup>
<animation:AnimationGroup AnimationName="Collapse">
<animation:SlideAnimation Direction="Out" SlideMode="Top" TargetElementName="PopupRoot" />
</animation:AnimationGroup>
</animation:AnimationSelector>
</Setter.Value>
</Setter>
</Style>
I did try:
<telerik:RadComboBox
...
Background="{x:Null}"
>
or
<telerik:RadComboBox
...
Background="Orange"
>
not working
---------------
there is a
<ControlTemplate x:Key="EditableComboBox" TargetType="telerik:RadComboBox">
<ControlTemplate x:Key="NonEditableComboBox" TargetType="telerik:RadComboBox">
try to look in the templates where I could change the background, did not found any place to where.
Did I miss something?
<telerik:RadComboBox
x:Name="EditCompleteBox"
Text="{Binding Model.NearestTown, Mode=TwoWay}"
Tag="{Binding Model.PostalCodeID, Mode=TwoWay}"
DisplayMemberPath="Value"
IsEditable="False"
telerik:TextSearch.TextPath="Value"
TextSearchMode="StartsWith"
CanKeyboardNavigationSelectItems="True"
IsMouseWheelEnabled="True"
SelectionChanged="EditCompleteBox_SelectionChanged"
ItemsSource="{Binding Model.TownList, Mode=TwoWay}"
Width="250" Height="30"
Loaded="EditCompleteBox_Loaded"
StaysOpenOnEdit="True"
OpenDropDownOnFocus="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
>
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/>
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
</telerik:RadComboBox>
its works fine, but my background is not set from my styles:
<Style TargetType="telerik:RadComboBox"
>
<Setter Property="Template" Value="{StaticResource NonEditableComboBox}" />
<Setter Property="EditableTemplate" Value="{StaticResource EditableComboBox}" />
<Setter Property="NonEditableTemplate" Value="{StaticResource NonEditableComboBox}" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="22" />
<Setter Property="Padding" Value="5 0" />
<Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
<Setter Property="Background">
<Setter.Value>
<SolidColorBrush Color="{StaticResource MainColor}"/>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="animation:AnimationManager.AnimationSelector">
<Setter.Value>
<animation:AnimationSelector>
<animation:AnimationGroup AnimationName="Expand">
<animation:SlideAnimation Direction="In" SlideMode="Top" TargetElementName="PopupRoot" />
</animation:AnimationGroup>
<animation:AnimationGroup AnimationName="Collapse">
<animation:SlideAnimation Direction="Out" SlideMode="Top" TargetElementName="PopupRoot" />
</animation:AnimationGroup>
</animation:AnimationSelector>
</Setter.Value>
</Setter>
</Style>
I did try:
<telerik:RadComboBox
...
Background="{x:Null}"
>
or
<telerik:RadComboBox
...
Background="Orange"
>
not working
---------------
there is a
<ControlTemplate x:Key="EditableComboBox" TargetType="telerik:RadComboBox">
<ControlTemplate x:Key="NonEditableComboBox" TargetType="telerik:RadComboBox">
try to look in the templates where I could change the background, did not found any place to where.
Did I miss something?