This is a migrated thread and some comments may be shown as answers.

RadComboBox has strange appearance at runtime.

2 Answers 19 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Eugene asked on 29 Mar 2016, 06:30 PM

Hi! I use RadCombobox in my WPF MVVM application. I use Prism 6 and Prism UserControl(WPF) where I set RadComboBox. This Prism UserControl(WPF) is in one of Prism module projects in the application solution but not in the Shell project.  Below is declaration and creation of ObservableCollection in Model (I bind RadComboBox to this collection in View that is abovementioned Prism UserControl(WPF)):
public ObservableCollection<string> AvailableComPortsNames { get; set; }
this.AvailableComPortsNames = new ObservableCollection<string>(SerialPort.GetPortNames()); // in Model's constructor.

Below is declaration and creation of Model instance in ViewModel:

public ConnectionSettingsModel ConnectionSettingsModel
       get { return this._connectionSettingsModel; }
       set { this.SetProperty(ref this._connectionSettingsModel, value); }

this.ConnectionSettingsModel = new ConnectionSettingsModel(); // in ViewModel's constructor.

Below is View in a shortened form:

<UserControl x:Class="ConnectDisconnect.Views.ConnectionSettingsView"

         . . . . . . . . . . .

         <Label Grid.Row="0" Grid.Column="0" Content="Serial Port" HorizontalAlignment="Right"/>
        <telerik:RadComboBox x:Name="radComboBox" HorizontalAlignment="Left" Margin="1,3,1,2" Grid.Row="0" Grid.Column="1"

                     VerticalAlignment="Top"  Width="250" IsReadOnly="True"

                     ItemsSource="{Binding ConnectionSettingsModel.AvailableComPortsNames}" SelectedValue="{Binding SelectedComportName}"/>


Binding works good but the appearance of RadComboBox in runtime is very starnge. Please see attached files: 'RadCombobox_is_Closed.PNG' and 'RadCombobox_after_Element_Selection.PNG'. You can see there that RadComboBox has no marked border! Why? Help me solve this problem.

P.S. Just in case I display below ApplicationResources section of App.xaml file that is in the Shell project of application solution.

                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
            <Style TargetType="views:Shell" BasedOn="{StaticResource RadWindowStyle}" />

Shell is RadWindow and the application solution was created as Telerik Empty Project. And Shell was added to the application after the application creation.

2 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 30 Mar 2016, 05:09 AM
Please help me and prompt how to draw the outline of RadCombobox?
Top achievements
Rank 1
answered on 30 Mar 2016, 07:44 AM
I've solved the problem by setting of IsReadOnly = true and IsEditable = true. Now combobox has visible borders. So the question is closed.
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question