-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: ResolvedbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.investigate
Milestone
Description
I place the razor code in if statement, but it is error:

all my code:
@inherits HubComponent
@if (Visible)
{
<div style="position: absolute; z-index: 100; width: 400px; height: 200px;">
<Row Style="cursor: move;">
<Button Type="close" OnClick="OnCloseButtonClicked"></Button>
<span>资源管理器</span>
</Row>
<Row>
<Col>
<FileTree></FileTree>
</Col>
<Col>
<FileDetail></FileDetail>
</Col>
</Row>
</div>
}
@code
{
private bool visible = true;
private bool draggable = true;
[Parameter]
public bool Draggable
{
get
{
return draggable;
}
set
{
draggable = value;
}
}
[Parameter]
public bool Visible
{
get
{
return visible;
}
set
{
if (visible != value)
{
visible = value;
this.StateHasChanged();
}
}
}
private void OnCloseButtonClicked(MouseEventArgs args)
{
this.Visible = false;
}
}Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueStatus: ResolvedbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.investigate