verscuch button color zu wechseln, nicht geklappt (ignorieren)

This commit is contained in:
Aldin296
2023-04-19 09:46:32 +02:00
parent 6f96a7ecd9
commit 5d799b3959
3 changed files with 19 additions and 10 deletions
@@ -44,7 +44,8 @@
</Row>
</Column>
<Column ColumnSize="ColumnSize.Is4">
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
<Button Clicked="@ChangeButtonColor" Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Primary"Primary Outline>
<!--TODO: This button should change color-->
<BarIcon IconName="IconName.Bolt" />
</Button>
</Column>
@@ -143,5 +144,14 @@
r.Next( 3, 50 ) * r.NextDouble(),
r.Next( 3, 50 ) * r.NextDouble() };
}
//private Background buttonColor = Background.Primary;
private void ChangeButtonColor()
{
//device.on = !device.on;
}
}
@@ -18,11 +18,6 @@ namespace Elektrifikatsiya.Pages
{
public partial class Dashboard
{
string bgcolor { get; set; } = "00f"; // (starting value)
void SetColor()
{
bgcolor = "#fd7";
StateHasChanged(); // may not be required, but I'm at work right now, so can't check
}
}
}
@@ -42,8 +42,13 @@
</Column>
<Column ColumnSize="ColumnSize.Is4.OnDesktop.Is7.OnMobile">
<Button Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
<BarIcon IconName="IconName.Bolt" />
<Button class="btn1" Position="Position.Absolute.Top.Is50.Start.Is50.Translate.Middle" Color="Color.Dark" Outline>
<style>
.btn1:hover {
background: #E50000;
}
</style>
<BarIcon IconName="IconName.Delete" />
</Button>
</Column>
<br />
@@ -136,5 +141,4 @@
List<Device> plugs = new List<Device>() { new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "qiowruioewjfopa", Role.Admin), "Raum"), new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "Josne", Role.Admin), "Raum"), new Device("ffff:ffff:ffff:ffff", "Josne", IPAddress.Broadcast, new User("Joe", "qiowruioewjfopa", Role.Admin), "Raum"), };
}