Mekasu0124
Explore posts from servers✅ Assistance with CMD Commands (if not allowed, please delete)
I'm creating my own custom
.bat
file that I am going to be adding to my startup processes. I'm trying to find the absolute (or full) path's to programs that my computer has, and the only way I know how to do that is I think the linux way as I tried
and got this in return. Any suggestions? I'm doing it this way so that I don't have to consistently click through files and folders to find the programs I need and such. Thanks.2 replies
✅ How To Style ScrollBar Avalonia
I'm trying to follow the repo's page on styling the ScrollBar for the screen I'm working on. I'm trying to get it so that the border of the outter most part of the scroll bar is the
ButtonPrimaryNight
dynamic resource and the background is transparent. Then the moving part inside of the ScrollBar I would like to have the color of dynamic resource TextColorNight
and I'd like to have some space on the inside around the moving part of the scroll bar. If anyone can help achieve this, I would greatly appreciate it.2 replies
✅ How To Use C# To Access FastAPI Server?
I'm not sure if it's possible, maybe it is and I've just not learned it yet, but I use FastAPI for my application backends in languages other than C# as I've been learning the Avalonia Framework more. In that time, I've just been using
Microsoft.Data.Sqlite
relative databases to storage and access information. I want to switch to using my FastAPI backends instead, I just can't find a tutorial on how to do it. Any suggestions for a good tutorial or youtube videos? Thanks.52 replies
How to use a templated control in main window view?
The project will build and run, but will not display the templated control on the designer or when the application is ran. Do I have something wrong? I've been following AngelSix's Avalonia Tutorial to start back at the basics and relearn what I didn't take the time to learn before, and we're at the part of using TemplatedControls and I can't get mine to show up. Thanks in advance!
4 replies
✅ How To Pass A String or LoginModel back through navigation Avalonia.MVVM
LoginView.axaml: https://pastebin.com/hnwBdAe9
MainWindowViewModel.cs: https://pastebin.com/6LMgkL0c
LoginViewModel.cs: https://pastebin.com/0aZknjcQ
How would I click the "Forgot Password" or "New User" buttons and send back a simple string that says "forgot" for Forgot Passowrd or "new" for New User and if I click Login, it attempts to login? In passing either a string or a LoginModel back to the MainWindowViewModel, how would I go about determining which one it is being sent back in the else clause of the ValidateUserLogin function? Thanks in advance
1 replies
Accessing Function from Nested UI File - Avalonia
Ok so I have the following file structure for my Avalonia MVVM project
In my FileMenu.axaml file I have a menu option
I know to bind it to a command I would do
however, the exit function is in my MainWindowViewModel. So I have two questions.
1. Is it ok if I put the exit command in the FileMenu.axaml.cs file to exit the program?
2. If not, do I create a ViewModel file in the same directory as the FileMenu.axaml file and then call that code behind for all of my nested menu options?
either way, if it's ok to stay in the MainWindowViewModel, then how do I properly bind to it? I remember in a Todo tutorial they did something like a this.Something.bind.x or something like that. Let me see if I can find it
17 replies
✅ How to use a UserControl inside of a Window?
So I've moved part of the menu bar at the top of the screen to another UserControl file as my menu bar has a lot of options so I'm breaking it up. As the code above currently sits, I have a blank screen with an arrow in the top-right corner, but nothing else. I used the reference from this stack overflow comment to put in the
xmlns:uc=""
and the <uc:FileMenu />
. Here is the full code for the <uc:FileMenu />
page that is in Views/MenuBar. I'm just not sure what I'm doing wrong. Thanks12 replies
✅ How to work with Python A.I.'s
Ok, although I'm no where near ready to start writing my first line of code, I do want to get an idea of what I'm getting myself into. I'm building the A.I. in python and I'll be building an Avalonia desktop application that will interact with the A.I.
What I'm wondering is if there are any libraries, or other, that anyone recommends that would go great with this idea? Thanks.
38 replies
✅ Reducing code to separate UserControls for easier readability Avalonia
code: https://pastebin.com/zEFZNhip
I'm wanting to learn how to break some of this screen down into a reusable UserControl that I can call in other places as well, but I can't get past creating the
/Views/UserControls
directory and creating a new user control as I'm not sure what part(s) can be broken down. Thanks1 replies
How do I use models from Project A in Project B?
Lets say I have a models folder with a few models in it inside of Project A and I've created another project under the same
.sln
called Project B. I instead of having to create duplicate models between both projects, I want to use the models with Project A's models folder inside of Project B. I tried
but I get a resolve error basically saying it can't find it, but the folder structure is
. Thanks in advance.32 replies
How To Set Vertical Snap Points on Avalonia ScrollViewer
I'm curious to know if this is such a thing. Basically what I'm wanting to do is when the user clicks the buttons to scroll, or uses their mouse wheel, it will either auto scroll or "jump" with a scroll animation to the nth child within each of the borders. Is there a way I can name the border's and achieve this? Thanks.
1 replies
✅ Converting From ReactiveUI to Community Toolkit
ok so I'm good on how to use Community Toolkit in the ViewModel, however, I have no idea how it's used for screen navigation in the MainWindowViewModel and I can't find a tutorial online or a youtube video explaining it. Does anyone have anything?
1 replies
✅ Catching different errors using System.Data.SQLite
so I'm wanting to write a custom class that error handles my database. For example:
I would somehow (idk how) use the class within the code above for adding a new user to the database. In the create database function, the Username field is unique. A user tries to create a new account with a username that already exists. I would like for the process to be something like
1. user clicks create user button call database function
2. database tries to save -> send error to custom error handler class
3. function for unique errors sends back some type of value to the View for the user to tell them that the username already exists and to try again
How would I go about doing this? I wanted to do a custom class so that I could call the error class anywhere I needed throughout my database file and be able to still have the program act accordingly.
30 replies