38 lines
743 B
Plaintext
38 lines
743 B
Plaintext
@using System.Collections.Generic
|
|
|
|
<div>
|
|
<h2>Touch position</h2>
|
|
<p>
|
|
Output: <span id="output">@message</span>
|
|
</p>
|
|
<p>
|
|
<button ontouchstart=@OnTouch
|
|
ontouchcancel=@OnTouch
|
|
ontouchenter=@OnTouch
|
|
ontouchleave=@OnTouch
|
|
ontouchend=@OnTouch
|
|
ontouchmove=@OnTouch>
|
|
TOUCH ME
|
|
</button>
|
|
</p>
|
|
<p>
|
|
<button onclick="@Clear">Clear</button>
|
|
</p>
|
|
</div>
|
|
|
|
@functions {
|
|
|
|
string message;
|
|
|
|
void OnTouch(UITouchEventArgs e)
|
|
{
|
|
message += e.Type;
|
|
Console.WriteLine(JsonUtil.Serialize(e));
|
|
StateHasChanged();
|
|
}
|
|
|
|
void Clear()
|
|
{
|
|
message = string.Empty;
|
|
}
|
|
} |