Gallery fixed
This commit is contained in:
parent
74fe4ca4a1
commit
3fb4ab3934
|
@ -50,17 +50,21 @@
|
|||
|
||||
List<BildInfoModel> bilderVomWunsch = _bildInfos!.Where(info => info.WunschId == wunschInfo.Id).ToList();
|
||||
|
||||
void ButtonLeft()
|
||||
async Task ButtonLeft()
|
||||
{
|
||||
listIndex = (listIndex != 0) ? listIndex - 1 : 0;
|
||||
bildInfo = _bildInfos[listIndex];
|
||||
wunschInfo = await WunschInfoData.GetWunschInfoAsync(bildInfo.WunschId);
|
||||
bilderVomWunsch = _bildInfos!.Where(info => info.WunschId == wunschInfo.Id).ToList();
|
||||
DialogService.Refresh();
|
||||
}
|
||||
|
||||
void ButtonRight()
|
||||
async Task ButtonRight()
|
||||
{
|
||||
listIndex = (listIndex != _bildInfos.Count - 1) ? listIndex + 1 : _bildInfos.Count - 1;
|
||||
bildInfo = _bildInfos[listIndex];
|
||||
wunschInfo = await WunschInfoData.GetWunschInfoAsync(bildInfo.WunschId);
|
||||
bilderVomWunsch = _bildInfos!.Where(info => info.WunschId == wunschInfo.Id).ToList();
|
||||
DialogService.Refresh();
|
||||
}
|
||||
|
||||
|
@ -69,19 +73,19 @@
|
|||
@<div>
|
||||
<RadzenStack Orientation="Orientation.Horizontal" Wrap="FlexWrap.Wrap">
|
||||
<RadzenStack Orientation="Orientation.Horizontal">
|
||||
<RadzenButton Click="ButtonLeft" Disabled="(listIndex == 0)" Style="border-radius: 0%"> </RadzenButton>
|
||||
<RadzenButton Click=@(async ()=> await ButtonLeft()) Disabled="(listIndex == 0)" Style="border-radius: 0%" Text="<"></RadzenButton>
|
||||
<div>
|
||||
<RadzenStack Orientation="Orientation.Vertical">
|
||||
<RadzenImage Style="width: 400px; height: 400px;" Path="@bildInfo.Dateiname" />
|
||||
</RadzenStack>
|
||||
<RadzenText Text="@wunschInfo.BildBeschreibung" />
|
||||
</div>
|
||||
<RadzenButton Click="ButtonRight" Disabled="(listIndex == _bildInfos.Count - 1)" Style="border-radius: 0%"> </RadzenButton>
|
||||
<RadzenButton Click=@(async ()=> await ButtonRight()) Disabled="(listIndex == _bildInfos.Count - 1)" Style="border-radius: 0%" Text=">"></RadzenButton>
|
||||
</RadzenStack>
|
||||
@foreach (var bild in bilderVomWunsch)
|
||||
{
|
||||
<RadzenImage class="small-image" Path="@bild.Dateiname"
|
||||
Click="() => { bildInfo = bild; DialogService.Refresh(); }" />
|
||||
Click="() => { bildInfo = bild; listIndex = _bildInfos.IndexOf(_bildInfos.First(info => info.Id == bildInfo.Id)); DialogService.Refresh(); }" />
|
||||
}
|
||||
</RadzenStack>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue