Position of Calendar in DatePicker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ichibon
    New Member
    • Jan 2010
    • 3

    Position of Calendar in DatePicker

    Hi, I have trouble setting the position of the DatePicker, a control from WPF Toolket June 2009 release.

    When click on the DatePicker control, the Calendar always open as a drop down and expands to the right, but the Calendar goes out of bound as the DatePicker control is aligned to the Right of the screen.

    Since I cannot change the location or alignment of the DatePicker, I would like the Calendar opens up as a drop down but expands to the Left of the screen, without changing the flowDirection. Is this possible? If so, please help and explain how. Thanks!
    Attached Files
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    What am I failing to understand?
    You were able to take a screen shot of it, so it appears to NOT be off the screen or out of bounds. It doesn't look chopped in any way.

    Comment

    • ichibon
      New Member
      • Jan 2010
      • 3

      #3
      Hi tlhintoq,

      The image is an prototype that I'm building on Windows, which will be ported to an embedded device where the calendar will be cropped once it goes out of bound. Sorry for the confusion.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Instead of placing the prompts beside the DateTime pickers consider placing them on top of them.

        Or you could consider making the DateTime pickers shorter (since it looks like you're wasting a lot of space with them stretched out across the page).


        Are you sure that the DateTime picker pop up doesn't just go to the edge of the screen (are you sure it get's cut off in the device?)

        -Frinny

        Comment

        • ichibon
          New Member
          • Jan 2010
          • 3

          #5
          Hi Frinny,

          Thanks for your response.

          I don't understand your first advice on "placing them on top". Can you please explain it?

          I can make the DateTime picker shorter, but it doesn't uniform with other fields that has been blocked. I can do is to shrink the size once it is in focus, but it is an undesired behavior.

          I am not sure about the device because we have not get to the stage yet. I did try moving my app to the right side of my screen, and it just go to the end of the screen. Maybe I don't need to do a thing once we load it to the device

          Despite my findings above, I would still like to know if I can do one of the following to be certain of the app behavior:

          1. Reverse the order of the texbox and the calendar mini-button, which should move the calendar drop down to start from the beginning of the control, or
          2. Make the calender to expand to the right, without change the flowdirection.

          Thanks again!

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            You're actually probably more knowledgeable than I am in WPF. I've only been playing with it for a week or so. Do you have something like Expressions Blend to help you figure this stuff out? (Please note that you need more than 1 gig of RAM to run this application or else bad things happen...I know from experience)

            What I was recommending is:
            Code:
            Prompt for DateTimePicker
            <date time picker>

            I'm going to try experimenting with this too to see if I can help you.

            -Frinny

            Comment

            • tlhintoq
              Recognized Expert Specialist
              • Mar 2008
              • 3532

              #7
              The image is an prototype that I'm building on Windows, which will be ported to an embedded device where the calendar will be cropped once it goes out of bound. Sorry for the confusion.
              So you aren't really sure that it is going to be cut off.
              I think you will find that the calendar control, like most menus, will automatically reposition itself if it trys to open outside the bounds of the screen.
              I suggest you try making your form/window fullscreen as a test, then open the calendar actually off the edge of the screen and CONFIRM that if it actually cuts off or not.

              Comment

              Working...