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
  1. Home
  2. The Lounge
  3. WPF Pain In The Anal Pore

WPF Pain In The Anal Pore

Scheduled Pinned Locked Moved The Lounge
25 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #1

    In WinForms, you could place a label, turn off auto size, and then have your way with the properties to modify the alignment. In WPF, you have to enclose a TextBlock with not one, but TWO border elements in order to set a border and color the background properly. Every day I use this crap pile, I find something else that is so insanely difficult to figure out and do that I wonder how anyone can work with it and honestly say they like it.

    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

    C N N 3 Replies Last reply
    0
    • realJSOPR realJSOP

      In WinForms, you could place a label, turn off auto size, and then have your way with the properties to modify the alignment. In WPF, you have to enclose a TextBlock with not one, but TWO border elements in order to set a border and color the background properly. Every day I use this crap pile, I find something else that is so insanely difficult to figure out and do that I wonder how anyone can work with it and honestly say they like it.

      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Yeah, I worked that out the other day, that is indeed a PITA. how about the fact that in WPF it's not easy to find out the position of an element on the screen ? I have two different panes I switch between and I wanted to manually position a video over one, then move it to be over the other as I swap. That proved to be too fraught with danger, which means my app is not as smooth as I'd like it to be.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      T L realJSOPR 3 Replies Last reply
      0
      • C Christian Graus

        Yeah, I worked that out the other day, that is indeed a PITA. how about the fact that in WPF it's not easy to find out the position of an element on the screen ? I have two different panes I switch between and I wanted to manually position a video over one, then move it to be over the other as I swap. That proved to be too fraught with danger, which means my app is not as smooth as I'd like it to be.

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

        T Offline
        T Offline
        Todd Smith
        wrote on last edited by
        #3

        So what DID you gain by using WPF over WinForms or WIN32 (rock on!).

        Todd Smith

        N C 2 Replies Last reply
        0
        • T Todd Smith

          So what DID you gain by using WPF over WinForms or WIN32 (rock on!).

          Todd Smith

          N Offline
          N Offline
          Nish Nishant
          wrote on last edited by
          #4

          Wow - so you can post to this thread? All my attempts to reply to John failed in a weird way. The post fails, but the reply shows up in the Lounge for a few seconds, and on refreshing, the reply vanishes. I've reported a bug in the Suggestions forum. :~

          Regards, Nish


          Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
          My latest book : C++/CLI in Action / Amazon.com link

          D realJSOPR 2 Replies Last reply
          0
          • realJSOPR realJSOP

            In WinForms, you could place a label, turn off auto size, and then have your way with the properties to modify the alignment. In WPF, you have to enclose a TextBlock with not one, but TWO border elements in order to set a border and color the background properly. Every day I use this crap pile, I find something else that is so insanely difficult to figure out and do that I wonder how anyone can work with it and honestly say they like it.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #5

            Hey John, Could you post same sample xaml showing what you mean?

            Regards, Nish


            Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
            My latest book : C++/CLI in Action / Amazon.com link

            C 1 Reply Last reply
            0
            • N Nish Nishant

              Wow - so you can post to this thread? All my attempts to reply to John failed in a weird way. The post fails, but the reply shows up in the Lounge for a few seconds, and on refreshing, the reply vanishes. I've reported a bug in the Suggestions forum. :~

              Regards, Nish


              Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
              My latest book : C++/CLI in Action / Amazon.com link

              D Offline
              D Offline
              Douglas Troy
              wrote on last edited by
              #6

              Nishant Sivakumar wrote:

              Wow - so you can post to this thread? All my attempts to reply to John failed in a weird way. The post fails, but the reply shows up in the Lounge for a few seconds, and on refreshing, the reply vanishes. I've reported a bug in the Suggestions forum.

              See, even mentioning WPF in a Windows application results in unexpected behaviors ... :rolleyes:

              N 1 Reply Last reply
              0
              • D Douglas Troy

                Nishant Sivakumar wrote:

                Wow - so you can post to this thread? All my attempts to reply to John failed in a weird way. The post fails, but the reply shows up in the Lounge for a few seconds, and on refreshing, the reply vanishes. I've reported a bug in the Suggestions forum.

                See, even mentioning WPF in a Windows application results in unexpected behaviors ... :rolleyes:

                N Offline
                N Offline
                Nish Nishant
                wrote on last edited by
                #7

                Douglas Troy wrote:

                See, even mentioning WPF in a Windows application results in unexpected behaviors

                Yeah I was using Firefox. It's not WPF friendly yet as far as handling text goes. :rolleyes:

                Regards, Nish


                Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                My latest book : C++/CLI in Action / Amazon.com link

                D 1 Reply Last reply
                0
                • T Todd Smith

                  So what DID you gain by using WPF over WinForms or WIN32 (rock on!).

                  Todd Smith

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  Cool animated UI. Scratch that. We were able to create an app almost as cool as a Mac app. That's a better definition.

                  Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                  T 1 Reply Last reply
                  0
                  • N Nish Nishant

                    Hey John, Could you post same sample xaml showing what you mean?

                    Regards, Nish


                    Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                    My latest book : C++/CLI in Action / Amazon.com link

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    What I think he means is that to create a border around a shape ( for example, a rect with rounded corners ), you create the rect. then you create it again with a border, so that it's drawn just inside, creating the border in the color of the outside shape. Then you place content inside that. If WPF is not incredibly verbose and drawn out to do simple things, then it sure is not intuitive how it's not the case.

                    Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                    N 1 Reply Last reply
                    0
                    • C Christian Graus

                      What I think he means is that to create a border around a shape ( for example, a rect with rounded corners ), you create the rect. then you create it again with a border, so that it's drawn just inside, creating the border in the color of the outside shape. Then you place content inside that. If WPF is not incredibly verbose and drawn out to do simple things, then it sure is not intuitive how it's not the case.

                      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                      N Offline
                      N Offline
                      Nish Nishant
                      wrote on last edited by
                      #10

                      Ah okay, I got what he means now.

                      Regards, Nish


                      Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                      My latest book : C++/CLI in Action / Amazon.com link

                      1 Reply Last reply
                      0
                      • N Nish Nishant

                        Douglas Troy wrote:

                        See, even mentioning WPF in a Windows application results in unexpected behaviors

                        Yeah I was using Firefox. It's not WPF friendly yet as far as handling text goes. :rolleyes:

                        Regards, Nish


                        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                        My latest book : C++/CLI in Action / Amazon.com link

                        D Offline
                        D Offline
                        Douglas Troy
                        wrote on last edited by
                        #11

                        :doh: :-D

                        1 Reply Last reply
                        0
                        • C Christian Graus

                          Yeah, I worked that out the other day, that is indeed a PITA. how about the fact that in WPF it's not easy to find out the position of an element on the screen ? I have two different panes I switch between and I wanted to manually position a video over one, then move it to be over the other as I swap. That proved to be too fraught with danger, which means my app is not as smooth as I'd like it to be.

                          Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                          L Offline
                          L Offline
                          Lutoslaw
                          wrote on last edited by
                          #12

                          Christian Graus wrote:

                          it's not easy to find out the position of an element on the screen ?

                          WPF represents a new approach to programming. You can do this and that but if you want something different then it pops up and asks "Why the hell would you want to do that? There is a much better way to solve your problem but ha ha I'm not going to tell you (keep trying, looser).". My symphaties.

                          Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

                          C 1 Reply Last reply
                          0
                          • C Christian Graus

                            Cool animated UI. Scratch that. We were able to create an app almost as cool as a Mac app. That's a better definition.

                            Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                            T Offline
                            T Offline
                            Todd Smith
                            wrote on last edited by
                            #13

                            Christian Graus wrote:

                            Cool animated UI. Scratch that. We were able to create an app almost as cool as a Mac app. That's a better definition.

                            Google took over the world with a near blank page, a single edit box and a completely non-animated results page :cool:

                            Todd Smith

                            C R 2 Replies Last reply
                            0
                            • T Todd Smith

                              Christian Graus wrote:

                              Cool animated UI. Scratch that. We were able to create an app almost as cool as a Mac app. That's a better definition.

                              Google took over the world with a near blank page, a single edit box and a completely non-animated results page :cool:

                              Todd Smith

                              C Offline
                              C Offline
                              Christian Graus
                              wrote on last edited by
                              #14

                              Our app was more visual than a search engine :)

                              Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                              realJSOPR 1 Reply Last reply
                              0
                              • L Lutoslaw

                                Christian Graus wrote:

                                it's not easy to find out the position of an element on the screen ?

                                WPF represents a new approach to programming. You can do this and that but if you want something different then it pops up and asks "Why the hell would you want to do that? There is a much better way to solve your problem but ha ha I'm not going to tell you (keep trying, looser).". My symphaties.

                                Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

                                C Offline
                                C Offline
                                Christian Graus
                                wrote on last edited by
                                #15

                                gajatko wrote:

                                keep trying, looser)

                                I'm looser than you ?

                                Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                                L 1 Reply Last reply
                                0
                                • T Todd Smith

                                  Christian Graus wrote:

                                  Cool animated UI. Scratch that. We were able to create an app almost as cool as a Mac app. That's a better definition.

                                  Google took over the world with a near blank page, a single edit box and a completely non-animated results page :cool:

                                  Todd Smith

                                  R Offline
                                  R Offline
                                  rastaVnuce
                                  wrote on last edited by
                                  #16

                                  I'm sure, if google was making its blank page today, it would've been a blank WPF page :)

                                  To hell with circumstances; I create opportunities.

                                  1 Reply Last reply
                                  0
                                  • realJSOPR realJSOP

                                    In WinForms, you could place a label, turn off auto size, and then have your way with the properties to modify the alignment. In WPF, you have to enclose a TextBlock with not one, but TWO border elements in order to set a border and color the background properly. Every day I use this crap pile, I find something else that is so insanely difficult to figure out and do that I wonder how anyone can work with it and honestly say they like it.

                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                    N Offline
                                    N Offline
                                    nistrum404
                                    wrote on last edited by
                                    #17

                                    Am I missing something? Why not just put a label control on the form? Use a canvas if you want absolute positioning. I'm really enjoying working with WPF. It's as slow as hell even on good hardware but it's a real improvement for UI coding.

                                    --Matt

                                    realJSOPR 1 Reply Last reply
                                    0
                                    • C Christian Graus

                                      Yeah, I worked that out the other day, that is indeed a PITA. how about the fact that in WPF it's not easy to find out the position of an element on the screen ? I have two different panes I switch between and I wanted to manually position a video over one, then move it to be over the other as I swap. That proved to be too fraught with danger, which means my app is not as smooth as I'd like it to be.

                                      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                                      realJSOPR Offline
                                      realJSOPR Offline
                                      realJSOP
                                      wrote on last edited by
                                      #18

                                      Back when I started dickin' around with WPF, I was complaining about the annoying aspects of the WPF controls to someone here at work, specifically, the Label control regarding its lack of a Text property. They promptly informed me that if I want a Label control, I should use a TextBlock. However (and as I described above), the TextBlock control doesn't have the same abilities as the WinForms Label control. So, I switched to the Label control and it supports horizontal AND vertical alignment, as well as borders. WTF is Microsoft doing?

                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                      -----
                                      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                      1 Reply Last reply
                                      0
                                      • N Nish Nishant

                                        Wow - so you can post to this thread? All my attempts to reply to John failed in a weird way. The post fails, but the reply shows up in the Lounge for a few seconds, and on refreshing, the reply vanishes. I've reported a bug in the Suggestions forum. :~

                                        Regards, Nish


                                        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                                        My latest book : C++/CLI in Action / Amazon.com link

                                        realJSOPR Offline
                                        realJSOPR Offline
                                        realJSOP
                                        wrote on last edited by
                                        #19

                                        The forums are written in WPF. What you're seeing is a known issue that Microsoft will fix when they switch to whatever succeeds WPF as their preferred erection-building technology.

                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                        -----
                                        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                        1 Reply Last reply
                                        0
                                        • C Christian Graus

                                          Our app was more visual than a search engine :)

                                          Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

                                          realJSOPR Offline
                                          realJSOPR Offline
                                          realJSOP
                                          wrote on last edited by
                                          #20

                                          Ours isn't... I told them WPF would be a waste of time, but they're not having it.

                                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                          -----
                                          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

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