SpReeD
SpReeD
CC#
Created by Yarden on 10/27/2024 in #help
✅ How do I get to the graphical window (where I can drag and drop tools)
WinForms, WPF, etc are GUI-Frameworks - they have nothing to do with the language C#
94 replies
CC#
Created by Yarden on 10/27/2024 in #help
✅ How do I get to the graphical window (where I can drag and drop tools)
Not if used correctly. In WPF you don't use the designer, because it's not like WinForms where the designer does work. The WPF-Designer is a mess, that's why it's not advised to use it, write XAML by hand, it saves many headaches. Note: It's an advice, use at own risk.
94 replies
CC#
Created by SpReeD on 8/24/2024 in #help
✅ MAUI - Mutlitap Gesture
Can't actually believe it, but yeah, that's it!
private void TouchTrackingBehavior_TouchAction(object sender, TouchActionEventArgs e)
{
if (e.Type == TouchActionType.Pressed)
{
((MainPageViewModel)this.BindingContext).TapCommand.Execute(null);
}
}
private void TouchTrackingBehavior_TouchAction(object sender, TouchActionEventArgs e)
{
if (e.Type == TouchActionType.Pressed)
{
((MainPageViewModel)this.BindingContext).TapCommand.Execute(null);
}
}
What's so unbelievable is that it's not natively supported and only found in an unfinished/alpha state fork. But that's MAUI waui ¯\_(ツ)_/¯ Thanks a lot!
12 replies
CC#
Created by SpReeD on 8/24/2024 in #help
✅ MAUI - Mutlitap Gesture
Apparently nobody seems to have an answer 😦
12 replies
CC#
Created by SpReeD on 8/24/2024 in #help
✅ MAUI - Mutlitap Gesture
I tried the built-in TapGestures, didn't work, so I gave it a try with the CommunityToolkit approach using TouchBehavior. It has some fancy animation stuff, but doesn't offer actually more features.
<mct:TouchBehavior CurrentTouchStatusChanged="TouchBehavior_CurrentTouchStatusChanged"/>
<mct:TouchBehavior CurrentTouchStatusChanged="TouchBehavior_CurrentTouchStatusChanged"/>
private void TouchBehavior_CurrentTouchStatusChanged(object sender, TouchStatusChangedEventArgs e)
{
if (e.Status != TouchStatus.Started)
{
return;
}

((MainPageViewModel)this.BindingContext).TapCommand.Execute(null);
}
private void TouchBehavior_CurrentTouchStatusChanged(object sender, TouchStatusChangedEventArgs e)
{
if (e.Status != TouchStatus.Started)
{
return;
}

((MainPageViewModel)this.BindingContext).TapCommand.Execute(null);
}
That's my current mess, I tried different events, but with no luck - I accidentally found a way to fire my Command on ButtonUp and ButtonDown (TouchStatus), that's it^^
12 replies
CC#
Created by SpReeD on 8/24/2024 in #help
✅ MAUI - Mutlitap Gesture
Almost, tap the same element with multiple fingers - so that every finger is a tap event. Right now the tap is like a button press (button down & up), if pressed/tap-started, it's not possible to start another one, because it not yet ended (button up). My problem is that the logic of buttons doesn't apply to touchscreens, taps ain't buttons, so it seems to me unlogical to treat them like buttons. Every tap should fire an event (or tapbehavior command), every finger touch should to that. In addition there should be a Count of "taps/fingers" in the EventArgs, but I don't need that, all I need is that every finger fires an event on touch/down.
12 replies
CC#
Created by SpReeD on 8/24/2024 in #help
✅ MAUI - Mutlitap Gesture
Thanks, but no. By "Multitap" I mean the feature that recognizes "another" tap while being tapped, e.g. you place one finger on the screen and another afterwards, and so on, all of them should be recognized. At the moment it's like a button pressed, so you cannot press it while being pressed already, which sounds plausible, but Touchscreens don't work this way, you can "press" a button/element while it's being pressed.
12 replies
CC#
Created by oJaime on 7/11/2024 in #help
Work with .resx Resource files on vscode
That's where you start to write your own macros/workflow scripts - and if you do so, you'll eventually end up with something that resembles an IDE - reinventing the wheel might be fun
22 replies
CC#
Created by oJaime on 7/11/2024 in #help
Work with .resx Resource files on vscode
I wasn't joking when I wrote emacs
22 replies
CC#
Created by oJaime on 7/11/2024 in #help
Work with .resx Resource files on vscode
So advice you to use VI or emacs
22 replies
CC#
Created by oJaime on 7/11/2024 in #help
Work with .resx Resource files on vscode
I really don't get the obsession with vs-code, while at the same time a fully, specific, IDE, packed in a all-you-need package is available for free. People try desperately to hold on what is just a text-editor ¯\_(ツ)_/¯ Maybe the name is just misleading, they should name it like "Editor+"
22 replies
CC#
Created by Ramsey on 7/8/2024 in #help
✅ did i install a malware?
RAT is an abbrev. for Remote Administration Tool, yes, it's a cover name for a certain type of a trojan since the late 90s
80 replies
CC#
Created by eid on 7/8/2024 in #help
yield return
It's mostly performance related, also by using an interface the user is free to whatever collection one wanna implement. A win-win situation.
23 replies
CC#
Created by eid on 7/8/2024 in #help
yield return
Example:
private IEnumerable<int> GiveMeInts()
{
for (int i = 0; i < 10; i++)
{
yield return i;
}
}

IEnumerable<int> ints = this.GiveMeInts(); // not called
int[] intsArray = this.GiveMeInts().ToArray(); // called

foreach (int i in ints) // calls GiveMeInts
{
Debug.Print($"{i}");
}
private IEnumerable<int> GiveMeInts()
{
for (int i = 0; i < 10; i++)
{
yield return i;
}
}

IEnumerable<int> ints = this.GiveMeInts(); // not called
int[] intsArray = this.GiveMeInts().ToArray(); // called

foreach (int i in ints) // calls GiveMeInts
{
Debug.Print($"{i}");
}
23 replies
CC#
Created by eid on 7/8/2024 in #help
yield return
And depending on the condition, not even once.
23 replies
CC#
Created by eid on 7/8/2024 in #help
yield return
Combined with a filter like Where(<predicate>) you don't need to loop over each element.
23 replies
CC#
Created by eid on 7/8/2024 in #help
yield return
Also notable is that the result of an IEnumerable<T> function isn't called on it's assignment, but it's usage.
23 replies
CC#
Created by Prince J on 7/8/2024 in #help
Packages issue
Maybe there's a fork of it where somebody exchanged the packages
45 replies
CC#
Created by Prince J on 7/8/2024 in #help
Packages issue
GMap itself is somewhat outdated, but I don't know of a good alternative, tbh
45 replies
CC#
Created by Prince J on 7/8/2024 in #help
Packages issue
Not to forget that microsoft.data.sqlclient transitive packages has security issues and should be top-leveled as well. https://github.com/advisories/GHSA-m5vv-6r4h-3vj9
45 replies