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. Patience! Oh Patience, that can bear so much!

Patience! Oh Patience, that can bear so much!

Scheduled Pinned Locked Moved The Lounge
4 Posts 3 Posters 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    O, pazienza, pazienza che tanto sostieni! (Dante) Patience! Oh patience that can bear so much! I battled for more than two days in a Prism application to get events in a Blend-type behavior to work. The behavior was supposed to set the headings for a DataGrid when the ItemsSource for the DataGrid was set to a specific DataTable. The DataGrid was set to autogenerate columns. I got some really weird effects, until I finally figured out I had to introduce a 100 millisecond delay after the View that held the DataGrid loaded, before I loaded the DataTable. Suddenly all weirdness was gone! All that was needed was patience for a 100 ms delay after the View loaded! I introduced the delay using the DispatcherTimer. A lesson learnt costing me two days of my life!

    Get me coffee and no one gets hurt!

    U M 2 Replies Last reply
    0
    • L Lost User

      O, pazienza, pazienza che tanto sostieni! (Dante) Patience! Oh patience that can bear so much! I battled for more than two days in a Prism application to get events in a Blend-type behavior to work. The behavior was supposed to set the headings for a DataGrid when the ItemsSource for the DataGrid was set to a specific DataTable. The DataGrid was set to autogenerate columns. I got some really weird effects, until I finally figured out I had to introduce a 100 millisecond delay after the View that held the DataGrid loaded, before I loaded the DataTable. Suddenly all weirdness was gone! All that was needed was patience for a 100 ms delay after the View loaded! I introduced the delay using the DispatcherTimer. A lesson learnt costing me two days of my life!

      Get me coffee and no one gets hurt!

      U Offline
      U Offline
      User 10495434
      wrote on last edited by
      #2

      so there must be a delay after the view load? :doh:

      L 1 Reply Last reply
      0
      • L Lost User

        O, pazienza, pazienza che tanto sostieni! (Dante) Patience! Oh patience that can bear so much! I battled for more than two days in a Prism application to get events in a Blend-type behavior to work. The behavior was supposed to set the headings for a DataGrid when the ItemsSource for the DataGrid was set to a specific DataTable. The DataGrid was set to autogenerate columns. I got some really weird effects, until I finally figured out I had to introduce a 100 millisecond delay after the View that held the DataGrid loaded, before I loaded the DataTable. Suddenly all weirdness was gone! All that was needed was patience for a 100 ms delay after the View loaded! I introduced the delay using the DispatcherTimer. A lesson learnt costing me two days of my life!

        Get me coffee and no one gets hurt!

        M Offline
        M Offline
        Mark_Wallace
        wrote on last edited by
        #3

        start /wait -- a gift from God.

        I wanna be a eunuchs developer! Pass me a bread knife!

        1 Reply Last reply
        0
        • U User 10495434

          so there must be a delay after the view load? :doh:

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Keep in mind that the View's loaded event fires before it is rendered and becomes visible. There are still UI element activity after the event fired. If the View is a window, I will prefer to use the ContentRendered event, but in Prism the View is usually a UserControl, that does not have a ContentRendered event.

          Get me coffee and no one gets hurt!

          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