or
<
telerik:RadWindow
x:Class
=
"Vue.MainWindow"
x:Name
=
"mainWindow"
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
>
<
Grid
x:Name
=
"mainGrid"
>
<
telerik:RadTreeView
x:Name
=
"radTreeView"
Grid.Row
=
"1"
ItemsSource
=
"{Binding TypeDatabases}"
<telerik:RadTreeView.Resources>
<
HierarchicalDataTemplate
DataType
=
"{x:Type Modele:EntiteDatabase}"
ItemsSource
=
"{Binding Tables}"
>
<
StackPanel
Orientation
=
"Horizontal"
Height
=
"25"
>
<
Image
Source
=
"{Binding SourceIcone}"
Stretch
=
"Fill"
Height
=
"16"
/>
<
TextBlock
Text
=
"{Binding Description}"
TextAlignment
=
"Left"
VerticalAlignment
=
"Center"
/>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
InheritDataContext
=
"False"
DataContext
=
"{Binding DataContext, ElementName=mainWindow}"
>
<
telerik:RadMenuItem
Header
=
"Connexion"
Command
=
"{Binding OpenDatabase}"
/>
<
telerik:RadMenuItem
Header
=
"Déconnexion"
Command
=
"{Binding CloseDatabase}"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
</
StackPanel
>
</
HierarchicalDataTemplate
>
</
telerik:RadTreeView.Resources
>
</
telerik:RadTreeView
>
</
Grid
>
</
telerik:RadWindow
>
<
telerik:RadChart
Name
=
"radChartCAMois"
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
LegendLabel
=
"Chiffre d'affaire en DT"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:Area3DSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"IntValue"
></
telerik:ItemMapping
>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"StringValue"
></
telerik:ItemMapping
>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>
List<MyClass> a =
new
List<MyClass>{
new
MyClass{intValue = 1,stringValue =
"s1"
},
new
MyClass{intValue = 2,stringValue =
"s2"
}};
radChartCAMois.ItemsSource = a;
class
MyClass
{
public
int
intValue;
public
string
stringValue;
}
The RedComboBox displaying list of items for selection and this list will be empty to start with. If this list is empty, user should see an empty drop down so that the User knows there is nothing to select. With my code below, I just see a small 2 pixel line below combo, this give an impression to user that something is wrong with application. If you use windows provided ComboBox then it will a empty dropdown and we want the same behavior from RedComboBox.
How can I enable dropdown even if there are no items in the list?
<
RadComboBox
HorizontalAlignment
=
"Left"
Margin
=
"1,1,0,1"
VerticalAlignment
=
"Center"
Name
=
"comboname"
SelectedItem
=
"{Binding Path=Item, Mode=TwoWay}"
ItemsSource
=
"{Binding Path= ItemList}"
IsReadOnly
=
"False"
EmptyText
=
" - select an item - "
/>