RadComboBox has strange appearance at runtime.

3 posts, 0 answers
  1. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 29 Mar Link to this post

    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. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 30 Mar in reply to Eugene Link to this post

    Please help me and prompt how to draw the outline of RadCombobox?
  3. DevCraft banner
  4. Eugene
    Eugene avatar
    83 posts
    Member since:
    Jan 2016

    Posted 30 Mar in reply to Eugene Link to this post

    I've solved the problem by setting of IsReadOnly = true and IsEditable = true. Now combobox has visible borders. So the question is closed.
Back to Top