Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Kenneth Haugland

@Kenneth Haugland
About
Posts
2.8k
Topics
117
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Begun Backing Up My CP Articles
    K Kenneth Haugland

    Someone should really write some code for backing up articles to github :~

    The Lounge html question

  • Pin numbers.
    K Kenneth Haugland

    I had no choice in the matter; I just got a letter saying that this is your PIN number.

    The Lounge com lounge

  • Do americans not use the metric system because ...
    K Kenneth Haugland

    I found this video way too funny... :D

    The Lounge com question lounge

  • Binding Header in TabItem to child property in the ViewModel
    K Kenneth Haugland

    I have a standard C#, WPF, and PRISM project, and I wanted to have one module per tab item. But I want to bind the header of a property in the ViewModel directly to the parent TabItem. I tried this (among other things such as Content.DataContext.Message etc.) :

    I have a distinct feeling I have done this before, but I cannot figure it out at the moment, so any suggestions?

    WPF csharp wpf wcf question

  • I've heard it all now.
    K Kenneth Haugland

    Tell him to get a Finger-Longer :-D : Fing-Longer | Futurama Wiki | Fandom[^]

    The Lounge com lounge

  • I bought this book: encyclopedia of architecture
    K Kenneth Haugland

    I think not; I think the book is too old to still hold a copyright.

    The Lounge architecture question learning

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    You can use the Behavior class to mess around with that. Effective but I wont say pretty; it's an attached property

    The Lounge wpf design wcf com

  • Could a Giant Parasol in Outer Space Help Solve the Climate Crisis?
    K Kenneth Haugland

    Old idea: NASA's doomed plan to wrap the planet in a ring of floating copper - The Verge[^] Or we can smear all plants in the rain forest with sun protection cream? It should get everyone a job to do at least. :)

    The Insider News help html com question

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    I think it stinks at that job. Why has there been no improvement in the connection between UI and properties? All the errors and limitations of inputs connected to the UI are so tedious to do. Is the current situation really the best we can do?

    The Lounge wpf design wcf com

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    It was just a trick that made some things easier; there was nothing else special about it in my mind. And you could give your designer the Xaml and tell him/her to do their thing without having the need to speak to them. Kind of :laugh:

    The Lounge wpf design wcf com

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    honey the codewitch wrote:

    It's just a pattern, not a technology.

    Totally agree. I'm curios: Who says otherwise? :doh:

    The Lounge wpf design wcf com

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    I always just found bindings to leave the view clear of other code; just separate the view and other code. I used to like WinForms programming. It was so simple. Until the program got massive. And you would have to scroll endlessly to find the relevant code. MVVM just seems to me to be the next logical step to separate stuff and make the organization simpler.

    The Lounge wpf design wcf com

  • MVVM As Explained by an Idiot (Yours, Truly)
    K Kenneth Haugland

    I always thought of it as having only one difference from "normal" programming in WinForms. The View contained all the code for animations and layout; other than that, its pretty self-explanatory.

    The Lounge wpf design wcf com

  • Should 0.5 round up or down?
    K Kenneth Haugland

    It does both, does it not? 0.5 => 0 1.5 => 2 2.5 => 2 3.5 => 4 etc. This was mainly Carl Friedrich Gauss's idea. Basically, its a choice you make, and you could choose differently. Your computer might do it differently...

    C# question

  • Mounting TV with swing arm in draywall?
    K Kenneth Haugland

    That is probably what I'll end up doing anyway, but I'm still curious if it will hold. :-D

    The Lounge question game-dev learning

  • Mounting TV with swing arm in draywall?
    K Kenneth Haugland

    I wanted to mount my shiny new TV with a swing arm directly into my drywall. I just like the flexibility a swingarm would give me, but there are some issues that make it difficult to mount the swingarm directly into the studs in my wall. So the question became: is this even feasible with drywall anchors alone? So I started watching this video where he tested out some different drywall anchors (summation of the results are roughly 16 min into the video): Which Drywall Anchor is Best? Let's find out! - YouTube[^] I was trying out some physics calculations here and wanted a second opinion to see if I was completely off. The TV itself weighs about 25 Kg and the swingarm is about 5 Kg alone. When fully extended, the TV extends about 60 cm from the wall. The mount itself (that I had lying around) is secured to the wall with three screws. One 15 cm above the arm, one 5 cm above the arm, and one 5 cm below the arm. So I'm thinking: I have three forces working on the drywall: F_y , F_x and momentum M_0. F_y has to withstand at least 30 Kg, which looks good, as one of the three screws, with a proper anchor, should be able to handle this weight alone. The momentum the TV and mount generate, a little simplified: 30 Kg * 9,81 m/s^2 * 0.6 m = 177 N * m The outward force at each of the wall screws (I chose it equally, which is a bit simplified, I guess) is (0,15m + 0,05m + 0,05m) * 3 * F_x = 177 Nm => 708 N/3 = 72 Kg/3 => F_x = 25 Kg each? Yes, I know that I can put up a new drywall that can handle more loads, or I can place a stud or something equivalent to reinforce the TV mount. I just wanted to check if this makes sense from a theoretical viewpoint. There are, of course, some safety margins to consider (30% or so?), but I'll have to deal with that later I guess.

    The Lounge question game-dev learning

  • In .NET enumeration is slow
    K Kenneth Haugland

    You did the timing in debug mode, I assume? I always suspected that the compiler might optimize such things at release time, but no?

    The Lounge csharp design linq com graphics

  • Free game
    K Kenneth Haugland

    If I only could remember my Epic game password...

    The Lounge game-dev help question

  • I did a thing. It's neat.
    K Kenneth Haugland

    You can force C# to work like C++ with this code :laugh: I also remembered that a workaround for a bug in C# involved some Emit coding, which makes it pretty useful to know.

    The Lounge csharp design regex dotnet com

  • how hard to rewrite a legacy software from C++ to C# in WinForm?
    K Kenneth Haugland

    MFC to WPF or what? I did some conversions from C++ to C# for a complex math problem. That was pretty straight-forward since the finished C# code was not that different from C++ once you got into it.

    The Lounge csharp c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups