-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCheckedListBox.razor
71 lines (69 loc) · 2.6 KB
/
CheckedListBox.razor
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
@using BlazorStyled
<Styled @bind-Classname=@CheckedlistboxStyle>
background-color: @ListBackgroundColor.Name;
display: @DisplayStyle;
flex-direction: column;
gap: @ListItemMarginBottomStyle;
font-size: @FontSizeStyle;
height: @HeightStyle;
min-height: @HeightStyle;
max-height: @HeightStyle;
margin-top: 0;
margin-bottom: 0;
padding: 1px;
position: @Position;
left: @LeftStyle;
Top: @TopStyle;
width: @WidthStyle;
min-width: @WidthStyle;
max-width: @WidthStyle;
border-width: 1px;
border-style: solid;
border-color: black;
z-index: @ZIndex;
</Styled>
<Styled @bind-Classname=@ListitemStyle>
background-color: @ListItemBackgroundColor.Name;
color: @ListItemTextColorName;
font-family: Calibri;
font-size: @FontSizeStyle;
height: @ListItemHeightStyle;
left: @ListItemLeftStyle;
margin-bottom: 0;
max-height: @ListItemHeightStyle;
padding-bottom: 0;
padding-top: 0;
position: @listItemPosition;
text-align: left;
top: @ListItemTopStyle;
width: @ListItemWidthStyle;
min-width: @ListItemWidthStyle;
max-width: @ListItemWidthStyle;
z-index: @ZIndex;
object-fit: fill;
clear: both;
</Styled>
<div class="@CheckedlistboxStyle" tabindex="0" @onblur="HandleOnBlur" @ref="ContainerElement">
<table class="@ClassName" width="@Width" height="@Height">
@if (HasItems)
{
@foreach (Item item in Items)
{
<tr>
<td width="@ListItemWidth" height="@ListItemHeight">
<div class="@ListitemStyle">
<CheckBoxComponent Parent="this" Name="@item.Id.ToString()" Unit="@Unit"
Column1Width="@LabelWidth" Column2Width="@Width" CheckBoxValue="@item.ItemChecked"
HeightUnit="@HeightUnit" CheckBoxXPosition="@CheckBoxXPosition"
Height="@CheckBoxHeight" Width="@CheckBoxWidth"
CheckBoxYPosition="@CheckBoxYPosition" ClassName="@ListItemClassName"
CheckBoxTextXPosition="@CheckBoxTextXPosition" CheckBoxTextYPosition="@CheckBoxTextYPosition"
Text="@item.Text" ExternalId="@item.Id" BackgroundColor="@ListItemBackgroundColor.Name">
</CheckBoxComponent>
</div>
</td>
</tr>
}
}
</table>
</div>