-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLabel.razor
More file actions
75 lines (73 loc) · 2.1 KB
/
Label.razor
File metadata and controls
75 lines (73 loc) · 2.1 KB
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
73
74
75
@namespace DataJuggler.Blazor.Components
@using BlazorStyled
@inject IJSRuntime JSRuntime
<Styled @bind-Classname=@ImageStyle>
background-image: url('@ImageUrl');
background-repeat: no-repeat;
background-color: transparent;
background-size: 100% 100%;
transform: scale(@ImageScale);
transform-origin: left;
width: @ImageWidthStyle;
height: 100%;
</Styled>
<Styled @bind-Classname=@ControlStyle>
background-color: @BackgroundColor.Name;
display: @DisplayStyle;
left: @LeftStyle;
position: @Position;
top: @TopStyle;
height: @HeightStyle;
width: @WidthStyle;
visibility: @Visibility;
z-index: @ZIndex;
</Styled>
<Styled @bind-Classname=@TextStyle>
text-align: @TextAlign;
color: @TextColor.Name;
font-size: @FontSizeStyle;
font-family: @FontName;
</Styled>
<Styled @bind-Classname=@BottomMarginStyle>
width: @WidthStyle;
height: @MarginBottomStyle;
</Styled>
<div id="@ClientId" class="@ControlStyle">
@if (ShowCaption)
{
<div class="@CaptionClassName">@Caption</div>
}
@if (EnableClick)
{
<div class="@ClassName @TextStyle cursorpointer" @onclick="() => OnClick()">
@Text
</div>
}
else if (EnableDoubleClick)
{
<div class="@ClassName @TextStyle cursorpointer" @ondblclick="() => OnDoubleClick()">
@Text
</div>
}
else if (EditMode)
{
<div>
<input class="@TextBoxClassName" autocomplete="@AutoCompleteStyle" type="text" @bind="@Text"
@bind:event="oninput" onfocus="this.select()"
onClick="this.select();" @onkeydown="Enter" @ref="InnerControl" />
</div>
}
else
{
<div class="@ClassName @TextStyle">
@Text
</div>
}
@if (ShowImage)
{
<div class="@ImageClassName">
<div class="@ImageStyle"></div>
</div>
}
</div>
<div class="@BottomMarginStyle"></div>