/// <summary> /// Creates controls supporting input of multiple textual items and adds it to the control panel container. /// </summary> /// <param name="fi">The fi.</param> private void LoadTextCollection(Common.NetworkPackage.FormProperty fi) { Label label = new Label(); TextBox text = new TextBox(); label.Content = fi.Label + " (use spaces to seperate):"; label.Margin = new Thickness(10, 0, 10, 0); label.Width = SEARCH_COLUMN_WIDTH_MINUS_MARGIN; text.Text = fi.DefaultValue; text.Tag = fi.PropertyName; text.Margin = new Thickness(10, 0, 10, 0); text.Width = SEARCH_COLUMN_WIDTH_MINUS_MARGIN; _boundProperties.Add(fi.PropertyName, text); ControlPanel.Children.Add(label); ControlPanel.Children.Add(text); }
/// <summary> /// Creates controls supporting temporial input and adds it to the control panel container. /// </summary> /// <param name="fi">The fi.</param> private void LoadDateRange(Common.NetworkPackage.FormProperty fi) { Label label = new Label(); Label lblFrom = new Label(); Label lblTo = new Label(); DatePicker from = new DatePicker(); DatePicker to = new DatePicker(); StackPanel sp = new StackPanel(); // Primary Label label.Content = fi.Label + ":"; label.Margin = new Thickness(10, 0, 10, 0); label.Width = SEARCH_COLUMN_WIDTH_MINUS_MARGIN; // Picker Ranger - Panel sp.Margin = new Thickness(10, 0, 10, 0); sp.Width = SEARCH_COLUMN_WIDTH_MINUS_MARGIN; sp.Orientation = Orientation.Horizontal; // From lblFrom.Content = "From:"; lblFrom.Margin = new Thickness(10, 0, 0, 0); from.Margin = new Thickness(0, 0, 0, 0); from.Tag = fi.PropertyName + "_start"; _boundProperties.Add(fi.PropertyName + "_start", from); // To lblTo.Content = "To:"; lblTo.Margin = new Thickness(0, 0, 0, 0); to.Margin = new Thickness(0, 0, 0, 0); to.Tag = fi.PropertyName + "_stop"; _boundProperties.Add(fi.PropertyName + "_stop", to); sp.Children.Add(lblFrom); sp.Children.Add(from); sp.Children.Add(lblTo); sp.Children.Add(to); ControlPanel.Children.Add(label); ControlPanel.Children.Add(sp); }