Auger
Auger
CC#
Created by uffen on 6/20/2024 in #help
learning moq framework
Didn't they revert that though?
13 replies
CC#
Created by Ale on 6/15/2024 in #help
✅ Dependency injection
had no idea that ```diff was an option 😮
16 replies
CC#
Created by CG Seb on 4/29/2024 in #help
MAUI Popup at first start
Since OnAppearing is kind of an Event Handler of sorts, you can probably get away with making it an async void method. Generally, you wouldn't want to do that unless it is an event handler method. In this context you probably could to navigate.
protected override void void OnAppearing()
{
base.OnAppearing();

bool GCUAccepted = Preferences.Get(Constants.GCU_ACCEPTED_KEY, false);
if (!GCUAccepted)
{
GCUPopupPage page = new();
await popupNavigation.PushAsync(page);
}

// ....
}
protected override void void OnAppearing()
{
base.OnAppearing();

bool GCUAccepted = Preferences.Get(Constants.GCU_ACCEPTED_KEY, false);
if (!GCUAccepted)
{
GCUPopupPage page = new();
await popupNavigation.PushAsync(page);
}

// ....
}
2 replies
CC#
Created by glacinefrox on 5/21/2024 in #help
Brotli compression with all cores
This is a harder problem than it probably first appears... In order to have multithread compression, you'd have to break the file into chunks (Look into the Partitioner class for that), and then use a Parallel.ForEach to compress each chunk. And while that would work... you'd have to decompress each chunk and re-combine the exact same way. The order of chunk has to be persisted as metadata in order to decompress later.
5 replies
CC#
Created by stigzler on 5/19/2024 in #help
✅ How to use IRelayCommand in CommunityToolkit.Mvvm with parameters?
There is also a dialog window in VS that is "XAML Binding Failures" I think. That's a good one to keep your eye on while running the app
77 replies
CC#
Created by stigzler on 5/19/2024 in #help
✅ How to use IRelayCommand in CommunityToolkit.Mvvm with parameters?
Specifically the Mode=TwoWay part may help if you plan to set that value from code and from the UI toggle
77 replies
CC#
Created by علي زيدان on 5/18/2024 in #help
A problem while making a request for API in maui .net
I'd recommend leowest's suggestions. The cleartext one anyway, as that can cause requests to fail. My assumption of the issue here is that your android emulator is probably not serving HTTP content locally on port 5117 like your PC is. If you inspect the request object, I'd be interested to see why it failed. If you get a HTTP status code, then you know at least it is hitting the HTTP server
14 replies
CC#
Created by stigzler on 5/19/2024 in #help
✅ How to use IRelayCommand in CommunityToolkit.Mvvm with parameters?
Although, the CanExecute becoming false will no longer allow you to execute that command to turn it back to true, so instead you could try
[ObservableProperty]
private bool _isCodeOutliningVisible;

[RelayCommand]
private void TestRC()
{
// Implementation using IsCodeOutliningVisible

if (IsCodeOutliningVisible)
{
// ...
}
}
[ObservableProperty]
private bool _isCodeOutliningVisible;

[RelayCommand]
private void TestRC()
{
// Implementation using IsCodeOutliningVisible

if (IsCodeOutliningVisible)
{
// ...
}
}
<ToggleButton x:Name = "CodeOutliningVisibleBT"
Content="Dave"
ToolTip="Toggle Code Outlining"
IsChecked="{Binding IsCodeOutliningVisible, Mode=TwoWay}"
Command="{Binding TestRCCommand}">
</ToggleButton>
<ToggleButton x:Name = "CodeOutliningVisibleBT"
Content="Dave"
ToolTip="Toggle Code Outlining"
IsChecked="{Binding IsCodeOutliningVisible, Mode=TwoWay}"
Command="{Binding TestRCCommand}">
</ToggleButton>
77 replies
CC#
Created by stigzler on 5/19/2024 in #help
✅ How to use IRelayCommand in CommunityToolkit.Mvvm with parameters?
Have you tried something like
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(TestRCCommand))]
private bool _isCodeOutliningVisible;

[RelayCommand(CanExecute = nameof(IsCodeOutliningVisible))]
private void TestRC(bool isCodeOutliningVisible)
{
// Note: You likely don't need a param, you have the value available as a class field

// Implementation...
}
[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(TestRCCommand))]
private bool _isCodeOutliningVisible;

[RelayCommand(CanExecute = nameof(IsCodeOutliningVisible))]
private void TestRC(bool isCodeOutliningVisible)
{
// Note: You likely don't need a param, you have the value available as a class field

// Implementation...
}
<ToggleButton x:Name = "CodeOutliningVisibleBT"
Content="Dave"
ToolTip="Toggle Code Outlining"
IsChecked="{Binding IsCodeOutliningVisible, Mode=TwoWay}"
Command="{Binding TestRCCommand}"
CommandParameter="{Binding IsCodeOutliningVisible}">
</ToggleButton>
<ToggleButton x:Name = "CodeOutliningVisibleBT"
Content="Dave"
ToolTip="Toggle Code Outlining"
IsChecked="{Binding IsCodeOutliningVisible, Mode=TwoWay}"
Command="{Binding TestRCCommand}"
CommandParameter="{Binding IsCodeOutliningVisible}">
</ToggleButton>
77 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
@ZZZZZZZZZZZZZZZZZZZZZZZZZ, idk if you had any suggestions. I don't remember how to fix that icon build issue
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Keep it up! Sometimes mobile app projects can be weird. Albeit that is a rather ambitious project 😄 You'll definitely learn a lot by trying to implement it, no matter how far you get
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Also, if you want a "save point" for your code, so you like a version you know used to work, look into how to use GIT, which is essentially save points for code. Even lets you compare what changes you made since the last "save point" (commit) then
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
I'd recommend creating a new project, make sure it builds, then copy over the code you were working on and make sure it still builds
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Honestly man, I've run into this before and I can't recall what I did to fix it
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
So what that defines is the mipmap folder and appicon(.png) for the android app we were looking for earlier
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Hm, that looks correct too
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
I can't read that 😄
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Also WIN+Shift+S takes a screenshot in Windows
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Or just open it in notepad or something
124 replies
CC#
Created by Red Legion on 1/19/2024 in #help
i am stuck
Usually you can right-click and do Open With, and pick XML editor
124 replies