Why is this code -

<ComboBox x:Name="roomSelect" Text="Список должностей" Grid.Column="1" HorizontalAlignment="Left" Margin="88,360,0,-283" Grid.Row="4" VerticalAlignment="Top" Width="156" FontSize="16" Cursor="Hand"/> 

Or this one

 <DatePicker x:Name="dataPiker" Text="Выберете дату" Grid.Column="1" HorizontalAlignment="Left" Margin="88,214,0,-136" Grid.Row="4" VerticalAlignment="Top" Width="156" FontSize="16" Cursor="Hand"/> 

How not to change the text in the design page? In the comboBox is empty, and in the dataPiker standard Select a date.

    1 answer 1

    ComboBox cannot contain arbitrary text in uneditable mode. It can contain only one of the elements specified via Items / ItemsSource

    You can translate it into an editable mode by setting IsEditable="True" , but most likely it will not work for you. You will have to edit the ComboBox template or place a TextBlock on top of it. Examples can be found here: How to display the default text “- Select Team -” in combo box on pageload in WPF?

    DatePicker may contain in the Text property only a valid date, if the date is not parsed, then it displays the standard placeholder "Select a date", in order to change it, you must edit the template. An example of template editing can be found here.