mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 08:55:59 +02:00
verscuch button color zu wechseln, nicht geklappt (ignorieren)
This commit is contained in:
@@ -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"), };
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user