Replies: 1 comment
-
I think you are on the right track with OnPropertyChanged, also take a look at main thread documenation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The navigation buttons need to be enabled or disabled, but these UI updates are not reflected on the screen until the function completes. the OnPropertyChanged events for these buttons are placed in a queue is my understanding, and once the function finishes, those events are executed one by one.
`public void NextWeek()
{
if (WeekIndex >= _weekDurtionCached.Count) return;
IsApiCalled = true;
DisableNavigationButtons();
WeekIndex++;
GoToWeek = "";
WeekIdx.Idx++;
setDataWeekWise(WeekIdxToString(WeekIndex));
IsApiCalled = false;
EnableNavigationButtons();
}
public void EnableNavigationButtons()
{
IsBackwardButtonEnabled = true;
IsForwardButtonEnabled = true;
}
public void DisableNavigationButtons()
{
IsBackwardButtonEnabled = false;
IsForwardButtonEnabled = false;
}
private void setDataWeekWise(string idx)
{
Tuple<string, string> Idx = GetIdx(WeekIndex, _defaultTeamName);
AllTeamVMs = AllEmpSubJobs = _teamDataCachedPerWeek[Idx]; //collection view update through AllTeamVMs
if(IsFilterApplied)
{
FilterJobs();
}
Duration = _weekDurtionCached[idx];
NameOfDaysList = Duration.NumberNameOfDaysOfDuration;
SubjobGridSpan = _weekDurtionCached[idx].NumberOfDaysOfDuration + 1;
GridWidth = ColumnWidth * SubjobGridSpan;
SetWeeksInDuration();
WeekOfTheYear = GetWeekOfYear(Duration.FromDate) + "/" + GetTotalWeeksInYear(Duration.FromDate);
YearOfTheWeek = Duration.FromDate;
SearchIndividualsSubjobs();
}`
Can anyone elaborate/answer on this please as I am a newbie to MAUI and learning it in detail. Also on this nothing is written in the documentation but if there is code written on this can anyone provide link to that will also be very helpful.
Beta Was this translation helpful? Give feedback.
All reactions