Skip to content
  • The problem with XAML

    The Insider News html wpf com help career
    8
    0 Votes
    8 Posts
    0 Views
    M
    I thought XAML was dead. I guess it's used for cross-platform development??? If it's not dead, it should be! Where's the garlic and wooden stake? Latest Article: Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain
  • 0 Votes
    3 Posts
    0 Views
    Richard DeemingR
    Marc Clifton wrote: Until it dies in 5-10 years as well. Years? I'm expecting 5-10 months until it's "legacy" code. :laugh: "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    4 Posts
    10 Views
    D
    That explains it. You have MUCH greater control just by typing the XAML directly. Nobody uses the Properties window to do this, or anything else for that matter. For example: ImageSource="Images\\Tile.bmp" Viewport="0,0,.2,.4" ViewportUnits="RelativeToBoundingBox" /> Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • 0 Votes
    2 Posts
    8 Views
    Graeme_GrantG
    Watch this: Models - WPF MVVM TUTORIAL #1 - YouTube[^] - he will answer many questions for you, including this one! Graeme "I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
  • Elephant you: Microsoft, HP, and Mcafeces

    The Lounge wpf workspace
    3
    0 Votes
    3 Posts
    0 Views
    O
    I remember when John McAffee was in all the trouble in Brazil and the company, which he no longer owned made a public statement that they were considering renaming the product. McAffee's response was please do, I don't want to be associated with your crappy software.
  • 0 Votes
    10 Posts
    22 Views
    J
    Seems like the other thread has a miscommunication. Your current app has the credential information in the client code. The type of credential information is irrelevant. The credential information is hard-coded because you stated that. (That means every actual user of the client will be using the same exact credentials.) So the other solution is to modify the code to do the following 1. Create a server API method that expects a requests from the client code. The client code does NOT make a call to google. The client code does not have the credentials. 2. The server code API uses the credentials and makes the call to google. 3. The server code returns the result of the google code to the client. Note in the above that I did not specify where the server code gets the credentials from. Could be it still hard-coded but in the server code. There are other possible solutions to providing the credentials to the server code.
  • 0 Votes
    3 Posts
    8 Views
    M
    Yeah, I'm using INotifyPropertyChanged and ObservableCollection (did not want to clutter the example) Ohhhh !!! thanks. :rose::rose: Fixed. I read that (passing the modelview to components) on a tutorial: See: [youtube-viewers/MainWindow.xaml at master · SingletonSean/youtube-viewers · GitHub](https://github.com/SingletonSean/youtube-viewers/blob/master/YouTubeViewers.WPF/MainWindow.xaml) And at the end of : [youtube-viewers/YouTubeViewersView.xaml at master · SingletonSean/youtube-viewers · GitHub](https://github.com/SingletonSean/youtube-viewers/blob/master/YouTubeViewers.WPF/Views/YouTubeViewersView.xaml) CI/CD = Continuous Impediment/Continuous Despair
  • fast directory infos for a lot of files

    WPF csharp database sqlite wpf help
    5
    0 Votes
    5 Posts
    12 Views
    P
    Thanks Richard, thats really great. A little correction to the following line: using (SQLiteCommand dbCom = new SQLiteCommand("INSERT INTO Dateien (Pfad, Datei) VALUES ($Pfad, $Datei)")) to using (SQLiteCommand dbCom = new SQLiteCommand("INSERT INTO Dateien (Pfad, Datei) VALUES ($Pfad, $Datei)", dbConn, dbTrans)) And now it works perfectly. And wow, it's done in 12 seconds !!! Very impressive !!! THANKS!
  • NuGet vs Write Your Own

    The Lounge visual-studio csharp wpf docker security
    28
    0 Votes
    28 Posts
    1 Views
    D
    A combination of both, including publishing my own libraries to nuget.org so I don't have to rewrite the same thing over and over, or, equally bad: copy-paste code between projects. The latter comes back to bite you when project diverge and you can't share fixes / enhancements any more (I've seen this on copy-pasted code at my work). My first nuget packages literally were so that I wouldn't have to write the same code twice - and that legacy continues. I don't think any of my packages have been used in only one place, and not having a central source of truth that can be fixed and easily propagated seems like a crazy idea to me. Libraries that I've made & found immensely useful across multiple apps include: - a duck-typer (duck-type objects or dictionaries to well-defined interfaces) - an ini file reader/writer - a management class for windows services (start/stop/restart/install/uninstall, etc) - container/manager for spinning up temporary databases for testing (mssql, mysql, sqlite, sqlce) & cleaning up once disposed - temporary http server, again for unit testing - spin up, add handlers, disposable pattern - an easy-to-use commandline arguments parser / mapper-to-an-object (because there was one that I liked, and the dev updated & broke things, and I thought "nuts, I can make that and have control over it" - miscellaneous utils like auto-deleting (via disposable pattern) temp files/folders, common reflection-based functionality, easy parallelisation, easy interaction with a sub-process (esp the I/O part), and some more For testing, I would imagine that you're either _not_ rolling your own unit test & assertion frameworks every time, or you're just not testing. I wanted smarter assertions that felt similar to JS-land ones, so I wrote NExpect. I'm happy to use nuget packages that are well-maintained & documented. I don't think anyone can do web work these days without nuget - I really don't think anyone is writing web servers from the ground up? Surely? ------------------------------------------------ If you say that getting the money is the most important thing You will spend your life completely wasting your time You will be doing things you don't like doing In order to go on living That is, to go on doing things you don't like doing Which is stupid. - Alan Watts https://www.youtube.com/watch?v=-gXTZM\_uPMY
  • Custom Control Styling

    WPF wpf csharp asp-net database dotnet
    6
    0 Votes
    6 Posts
    16 Views
    Richard DeemingR
    The AddOwner syntax lets you register another type for use with a DependencyProperty which has already been registered: How to: Add an Owner Type for a Dependency Property - WPF .NET Framework | Microsoft Learn[^] DependencyProperty.AddOwner Method (System.Windows) | Microsoft Learn[^] You can't use the TextDecorations class[^] as the property type; that's a static class used to provide access to the standard text decorations. Instead, you need to use the TextDecorationCollection class[^] as the property type, which is what the Inlines.TextDecorations property[^] does: Reference Source[^]: /// /// DependencyProperty for
  • WPF .Net Core Relay Command with Parameters

    WPF csharp wpf asp-net dotnet wcf
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Forgot Password

    WPF question csharp wpf help
    2
    0 Votes
    2 Posts
    7 Views
    Richard DeemingR
    Troy Hunt: Everything you ever wanted to know about building a secure password reset feature[^] "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • WPF Core Hyperlkink Custom Control

    WPF wpf csharp dotnet asp-net wcf
    5
    0 Votes
    5 Posts
    10 Views
    Richard DeemingR
    {TemplateBinding x} should be equivalent to {Binding x, RelativeSource={RelativeSource TemplatedParent}}. The error is telling you that you can't set a RelativeSource on a TemplateBinding. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Path Images

    WPF wpf help question
    2
    0 Votes
    2 Posts
    8 Views
    Richard DeemingR
    There are a number of tools you can use to convert PNG/JPEG images to XAML. For example, Inkscape[^] "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • Teaching in the field

    The Lounge c++ wpf learning
    38
    0 Votes
    38 Posts
    2 Views
    U
    While I completely agree with all of the POTENTIAL horror stories people have raised...points to the teacher for accepting the challenge and points to the student for stepping up to a challenge. This IS where knowledge comes from. BTW, 40+ years coding in the real world and mentoring many people. If you want to know true despair do what I do: teach a college course one night a week in C programming to a bunch of students who only saw the dollar signs of software development. Of the 59 remaining (out of initial class of 74) there are perhaps 5 - 8 that might have a future in software development.
  • editing a WPF DataGrid

    WPF csharp wpf question xml help
    2
    0 Votes
    2 Posts
    8 Views
    L
    Instead of a DataTable, deserialize the XMl into a collection of classes, that implement INotifyPropertyChanged, and bind to that. [Details of XML serialization | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/standard/serialization/introducing-xml-serialization) [https://stackoverflow.com/questions/4203540/generate-c-sharp-class-from-xml\](https://stackoverflow.com/questions/4203540/generate-c-sharp-class-from-xml) "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
  • .NET 7 is available today

    The Insider News csharp asp-net dotnet wpf winforms
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • .NET Framework versus .NET latest?

    C# csharp dotnet question wpf business
    7
    0 Votes
    7 Posts
    0 Views
    J
    Bruce Greene wrote: My question is - how important is it that I drop You have two customer bases 1. Existing 2. New For both types of customers do they buy new hardware? How often do they upgrade windows? Leaving it as is runs the risk of, at some point, your software will fail in some odd way or not run at all because of updates to windows. However updating also runs the risk that will not run on older versions either. These days older apps also have an increased security risk. Or at least it is perceived that way. So it is possible at some point that something (like a virus checker) might flag the app for something. Which makes customers nervous. You might also want to validate how exactly your build process works. If you are expecting to be able to download libraries (specific versions) any time you want at some point that might no longer be possible. You can address that keeping the libraries in your own source control and download nothing. Besides the customers the primary way is to look for "end of life" for anything. Could be operating system, libraries, hardware etc. For the version you specified above the date is April 26, 2022. It is unlikely anything will fail now. But you probably don't want to still be waiting 5 years from now. Microsoft .NET Framework - Microsoft Lifecycle | Microsoft Learn[^] If you have customers that do not upgrade then you will also need to plan on continuing supporting them. Note that this also means that you will need to have hardware and operating system that you can both test on and develop on. Keeping in mind however that even if it is good money maker at some point even they will find it difficult to keep running with the old equipment. Although some people are very ingenious at finding sources.
  • 0 Votes
    3 Posts
    0 Views
    K
    Ditto, also curious. TTFN - Kent
  • 0 Votes
    2 Posts
    7 Views
    Richard DeemingR
    You should be able to use the "live visual tree" and "live property explorer" tools, which are built in to Visual Studio: Inspect XAML properties while debugging - Visual Studio (Windows) | Microsoft Learn[^] "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer