This project has moved and is read-only. For the latest updates, please go here.

Control to schedule

Oct 20, 2014 at 1:13 PM
Edited Oct 20, 2014 at 1:29 PM
i am creating a restaurant s/w. in that i have to schedule menu.
user would b providing days to schedule menu and also input for each day schedule.
suppose,
user wants to schedule 3 days menu.they will enter 3 as schedule day
and user would provide details for each day..

like day 1,day 2,day 3
if user enters schedule day as 5,
day1 ,day2 ,day3 ,day4 ,day5

how can i do this ?which control can b used for the same

thanks and regards

Deepu
Oct 20, 2014 at 4:47 PM
Hi,

Maybe using a CollectionControlButton. When clicked it will show a CollectionControlDialog. This dialog contains a CollectionControl. This CollectionControl contains a listBox for the Days and a PropertyGrid to show each properties of the Days. Properties of a Day could be the DayName and the Menu for that day :
<xctk:CollectionControlButton x:Name="_collectionControlButton" Content="Schedule" />

_collectionControlButton.ItemsSource = new List<Day>() { new Day( "Day1" ), new Day( "Day2" ), new Day( "Day3" ) };
_collectionControlButton.NewItemTypes = new List<Type>() { typeof( Day ) }; //to be able to add new days in the CollectionControl

public class Day
  {
   // default Ctor is needed to be able to add new Days in the CollectionControl
    public Day()
    {
    }

    public Day( string title )
    {
      this.DayTitle = title;
    }

    public string DayTitle
    {
      get;
      set;
    }
    public string Menu
    {
      get;
      set;
    }
    
    //To display the DayTitle in the ListBox of the CollectionControl
    public override string ToString()
    {
      return this.DayTitle;
    }
}
Oct 21, 2014 at 8:50 AM
Edited Oct 21, 2014 at 11:20 AM
thank you so much for the advice.
as am new to WPF,its a new control for me...
is it possible to add combo box or checked list box in to the PropertyGrid ?

if combo box is possible,how to select multiple items in that combo box
Oct 21, 2014 at 1:45 PM
Hi,

You can try the LiveExplorer App available here https://wpftoolkit.codeplex.com/ to test the controls from the Toolkit. You will also find the documentation of each control here : https://wpftoolkit.codeplex.com/documentation.

The PropertyGrid have default editors. ComboBoxes will be used for properties of type enum. CheckBoxes will be used for properties of type bool. When using a PropertyGrid, you can use the editor you want for specific properties by using PropertyGrid.EditorDefinitions.

You can select many items in a comboBox if you use the control : CheckComboBox. It could be used as an editor for a specific property in the propertyGrid.EditorDefinitions.
Oct 23, 2014 at 10:00 AM
i think, PropertyGrid is available in "Plus" edition only
Oct 23, 2014 at 2:01 PM
Hi,

If you look at this page, you will see that the PropertyGrid is in the "Community Edition", and that the "Plus" edition also has the PropertyGrid but with more features.
https://wpftoolkit.codeplex.com/documentation