Sergey5588
Sergey5588
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
and its working ye
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
private void BindText() {
Binding bind = new Binding(); bind.Source = MainGame.GetInstance(); bind.Path = "light"; lightText.SetBinding(Label.TextProperty, bind); }
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
i made it like check this
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace IdleLight
{
[AddINotifyPropertyChangedInterface]
public partial class MainGame
{


private static MainGame _instance;
private MainGame() { }

public static MainGame GetInstance()
{
if(_instance == null)
{
_instance = new MainGame();
}


return _instance;

}






public int light { get; set; } = 0;
public int lightPerTick { get; set; } = 1;



}




}
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace IdleLight
{
[AddINotifyPropertyChangedInterface]
public partial class MainGame
{


private static MainGame _instance;
private MainGame() { }

public static MainGame GetInstance()
{
if(_instance == null)
{
_instance = new MainGame();
}


return _instance;

}






public int light { get; set; } = 0;
public int lightPerTick { get; set; } = 1;



}




}
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
yeah i made a singleton
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
oh i found
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
i found only dependency injection
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
what can you give me some articles or something
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
but how do i make it unique and accessable from other classes
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
and how do i make it
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
nooo i dont whant to
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
like i have a class with game logic and i have a static vars to use them anywhere
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
i see but how to use static vars
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
can you give an example of code
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
it is used to make the user interface understand when it is being updated
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
it notifies
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
yes
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
a bit
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
https://youtu.be/sxSk4sOszzs?feature=shared i found this but i need a static class and static vars
51 replies
CC#
Created by Sergey5588 on 8/22/2024 in #help
How to update UI easily on variable change in MAUI
I will look
51 replies