Ewl » Canonical The canonical version of EWL Read More
Clone URL:  
FlowRadioButtonSetup.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System; using System.Collections.Generic; namespace EnterpriseWebLibrary.EnterpriseWebFramework { /// <summary> /// The configuration for a flow radio button. /// </summary> public class FlowRadioButtonSetup { /// <summary> /// Creates a setup object for a standard radio button. /// </summary> /// <param name="displaySetup"></param> /// <param name="classes">The classes on the container.</param> /// <param name="highlightedWhenSelected"></param> /// <param name="action">The action that will occur when the user hits Enter on the radio button. Pass null to use the current default action.</param> /// <param name="pageModificationValue"></param> /// <param name="nestedContentGetter">A function that gets the content that will appear beneath the radio button.</param> /// <param name="nestedContentAlwaysDisplayed">Pass true to force the nested content to always be displayed instead of only when the button is selected. /// </param> public static FlowRadioButtonSetup Create( DisplaySetup displaySetup = null, ElementClassSet classes = null, bool highlightedWhenSelected = false, FormAction action = null, PageModificationValue<bool> pageModificationValue = null, Func<IReadOnlyCollection<FlowComponent>> nestedContentGetter = null, bool nestedContentAlwaysDisplayed = false ) { return new FlowRadioButtonSetup( displaySetup, classes, RadioButtonSetup.Create( action: action, pageModificationValue: pageModificationValue ), highlightedWhenSelected, nestedContentGetter, nestedContentAlwaysDisplayed ); } /// <summary> /// Creates a setup object for a read-only radio button. /// </summary> /// <param name="displaySetup"></param> /// <param name="classes">The classes on the container.</param> /// <param name="highlightedWhenSelected"></param> /// <param name="nestedContentGetter">A function that gets the content that will appear beneath the radio button.</param> /// <param name="nestedContentAlwaysDisplayed">Pass true to force the nested content to always be displayed instead of only when the button is selected. /// </param> public static FlowRadioButtonSetup CreateReadOnly( DisplaySetup displaySetup = null, ElementClassSet classes = null, bool highlightedWhenSelected = false, Func<IReadOnlyCollection<FlowComponent>> nestedContentGetter = null, bool nestedContentAlwaysDisplayed = false ) { return new FlowRadioButtonSetup( displaySetup, classes, RadioButtonSetup.CreateReadOnly(), highlightedWhenSelected, nestedContentGetter, nestedContentAlwaysDisplayed ); } internal readonly DisplaySetup DisplaySetup; internal readonly ElementClassSet Classes; internal readonly RadioButtonSetup RadioButtonSetup; internal readonly bool HighlightedWhenSelected; internal readonly Func<IReadOnlyCollection<FlowComponent>> NestedContentGetter; internal readonly bool NestedContentAlwaysDisplayed; private FlowRadioButtonSetup( DisplaySetup displaySetup, ElementClassSet classes, RadioButtonSetup radioButtonSetup, bool highlightedWhenSelected, Func<IReadOnlyCollection<FlowComponent>> nestedContentGetter, bool nestedContentAlwaysDisplayed ) { DisplaySetup = displaySetup; Classes = classes; RadioButtonSetup = radioButtonSetup; HighlightedWhenSelected = highlightedWhenSelected; NestedContentGetter = nestedContentGetter; NestedContentAlwaysDisplayed = nestedContentAlwaysDisplayed; } } }