How to placing objects in a box and avoid to get out of box in wpf

Hello guys.
I do not know what
title should I choose for
my question but I try to explain what
I mean. Look at the following
picture:
In the number 1,
You can see the issue that I want to do
design.
This section contains a
background image and a Rectangle
at the bottom.
In the number 2,
When I wan to change the location Rectangle, it
will be out of the box but Iwant
to be like number 3.
I do not want to Rectangle
go out of the box.How can I do that in WPF?
plz help.
I hope you
understand what I mean.
thanks.

Set the ClipToBounds property of the parent container (the "Box") to True:
<Border BorderBrush="Black" BorderThickness="1" Width="300" Height="300" Background="Silver"
ClipToBounds="True">
<DockPanel LastChildFill="False">
<!-- your background image here -->
<!-- the bottom Rectangle with negative margins:-->
<Rectangle DockPanel.Dock="Bottom" Fill="DarkGreen" Width="270" Height="50"
HorizontalAlignment="Left" Margin="-10 0 0 -10" ClipToBounds="True">
</Rectangle>
</DockPanel>
</Border>
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

Similar Messages

  • I was fooling around with the "reader" feature on my New iPad. I am now stuck with that and can't get out. Even my four digit code is read out in a machine voice and the iPad wont boot. How do I get out of this. Tried the red arrow slider. shut of the iPa

    I was fooling around with the "reader" feature on my New iPad. I am now stuck with that and can't get out. Even my four digit code is read out in a machine voice and the iPad wont boot. How do I get out of this. Tried the red arrow slider. shut of the iPa

    James,
    I cannot get into Settings! It keeps reading out Slide to Unlock when I try to slide teh arrow to open the fpur digit entry boxes.

  • Someone keeps putting my iPhone into lost mode in my other cloud account, and I keep getting out. How do I switch the cloud account to this one, so they won't be able to do it again

    Well, for the last week someones been putting my iPhone constantly in lost mode using my apple account and I keep getting out because I know my own password. I want to change the password but two other people I know use it, (who definetly wouldn't do this), someone else probably got ahold of the account and is spamming the phones into lost mode. I'm not in lost mode currently by the way. This repetition is really a hassle for me because I'm not always connected to the internet to get out of the lost mode, a few days ago, I went on a 12 hour flight and both my apple devices were probably put into the lost mode and I wasn't able to use my iPhone or iPad to do work and entertainment purposes. I was literally sitting there for 12 hours! So now that you sat through my problem, which I thank you for greatly, how do I switch apple/cloud accounts on my devices so this won't happen again? I hope you can give my solution, if there is one out there, and thank you in advance for atleast trying to solve my problem.

    The only way this can happen is with access to your id and password
    Read this and focus on "changing your Apple id"
    http://www.apple.com/support/appleid/manage/

  • How to sort photo events by date and avoid having duplicated photos on iPhone 6+

    How to sort photo events bby date and avoid having duplicated photos. Before the sorting by date worked perfectly by specifying "sort events by date ascending" in iPhoto from my Mac. Now the sorting from iPhoto has no more effect on the iPhones. And photos are often duplicated when synchronisin. Before these problems didn't happen. How to do?

    You can not  --  neither automatically or manually - you should never be in the masters folder and there is never a need to be - iPhoto is a SQLite database and it's database structure is determined by it (and changes from time to time) - use the supported access methods (direct access to the photo files is not supported and never has been) - either using iPhoto or using the media browser in the lower left hand corner of every open/attach/iupload window
    It is CRITICAL that you NEVER make any changes of any sort to the structure or content of the iPhoto library using the finder or any program other than iPhoto
    LN

  • CI (ABAP+Java) & DB in one AIX box and dialog Instance on a Linux box

    We trying to install SAP, CI+DB in one AIX box and dialog Instance on a Linux box. We are facing problem when trying to install Java Dialog Instance. Is it possible and recomended to install in the above manner?
    Has anyone done this? please share your exepeirience.
    thanks & regards,
    Harsha.
    ps we have read the Note 1067221 - Central Note for Heterogeneous Installation, which indicates this is possible.

    If you would have stated, which kind of problem you are facing, we could have seen, if the problem is related to because of heterogeneity or because of something different.
    It should be possible to do that - yes
    Markus

  • I keep getting an intermittent error on web pages where a blue box with a question mark appears instead of pictures.  For example Facebook and Zappos would load normally on one visit, but if I visit other websites and return I get the blue box.

    I keep getting an intermittent error on web pages where a blue box with a question mark appears instead of pictures.  For example Facebook and Zappos would load normally on one visit, but if I visit other websites and return I get the blue box instead of pictures. If I restart the problem will go away temporarly. However, normally returnes in time.

    HI,
    From the Safari Menu Bar click Safari/Preferences then select the Appearance tab. Tick the box next to: Display images when the page opens.
    If that box is already ticked, from the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset. Relaunch Safari. If you still have problems loading images, go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    Web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. These icons take up disk space and slow Safari down. It is possible to erase the icons from your computer and start fresh. *To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/ and move this file "webpageIcons.db to the Trash.*
    Make sure Safari is not running in Rosetta. Right or control click the Safari icon in your Applications folder then click Get Info. In the Get Info window click the black disclosure triangle so it faces down. Where you see Open using Rosetta... make sure that is NOT selected.
    If you still have problems, go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop. Relaunch Safari. If it's a successful launch, then that .plist file needs to be moved to the Trash.
    Carolyn

  • Got String= "100 600" and want to get out (length of first number not const

    Ive got String= "100 600" and want to get out
    the value 600 into int.
    Length of first number is not const : it can be 100 or 3000
    How can how do it ?
    10x for the help

    It would depend on the format of your string. If you can gurantee that the format will always be "number number" then you can use the StringTokenizer to split the two numbers and take the second one. The code would look similar to this:
    String s = "100 600";
    StringTokenizer st = new StringTokenizer(s, " ");
    //--- This "scrolls" past the first number.
    st.nextToken();
    String num = st.nextToken();
    The variable num will always have the second number.
    Hope this helps.

  • Stuck in Bootcamp Windows install and can't get out

    late 2009 iMac with Mavericks with homemade fusion drive with super drive removed.
    Was working fine until i tried to use bootcamp to install Windows 7. Now I'm stuck in the Windows partition, windows won't install and can't get out of the loop.  Machine boots white screen with no apple logo and chimes. Eventually has black screen with No bootabe device -- insert boot disk and press any key. I have a USB drive. I've tried everything. Doesn't seem to be recognizing bluetooth keyboard. No sort of button combination on startup works. Tried holding X, command-alt PR, shift, command-R, option. Tried everything. Light doesn't come on on keyboard in startup which means it's probably not recognized. Tried disconnecting internal drives and booting from USB. Tried booting from Time Machine USB drive. Nothings works. Think a USB keyboard would solves this?

    I have gotten in this loop.  When doing this kind of thing, a usb keyboard would be good to have around, and that is probably the problem, because when I would boot, the first time set the windows partition to the default drive.  Hold the key combo and boot into OSX, and go into Settings/Startup Disk/ and change it to The osx hd.

  • HT201412 The Ipad came up with a notification, and can't get out of it. It's saying: Ipad not backed up. This Ipad hasn't been backed up.Backups happen when this Ipad is plugged in,locked, and connected to Wi-fi. When  I press OK it can't continue. Please

    The Ipad came up with a notification, and can't get out of it. It's saying: Ipad not backed up. This Ipad hasn't been backed up.Backups happen when this Ipad is plugged in,locked, and connected to Wi-fi. When  I press OK it can't continue. Please REPLY

    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I hit the magnifier tool on my iPad and now it only shows a portion of the screen and I cannot get out of it. What do I do?

    I hit the magnifier tool on my iPad and now it only shows a portion of the screen and I cannot get out of it. What do I do?

    Which magnifier tool are you referring to? If you double-tap with 3 fingers it should disable zoom. Then you can go into Setttings>Accessibility>Zoom and turn it off.

  • TS4062 my phone has frozen on a screen to sync and I cannot get out

    Help, cannot use my phone because it's frozen on a screen to sync and I cannot get out.  Cannot even turn it off

    it says "iCloud Backup - Backups happen when this iPhone is plugged in, locked and connected to Wi-Fi".  Was trying to go into settings to turn back on wifi and it wouldn't let me get past this screen

  • I have placed a check mark in the Block Pop-Up Windows box and when I restart Firefox, the box is empty and I begin receiving Pop-Up's again. What do I have to do to make the check-mark permanent?

    I have placed a check mark in the Block Pop-Up Windows box but when I restart Firefox, the box is empty and I begin receiving Pop-Up's again. What do I have to do to make the check-mark permanent?
    == This happened ==
    Every time Firefox opened

    See this:
    http://kb.mozillazine.org/Popups_not_blocked#Other_software_disables_the_popup_blocker

  • Slingbox -how do yo put the yellow, blue and white things in the comcast box?

    How do you connect the slingbox to the comcase box?   the directions say it goes between the comcast box and the router.   There is no receptical for the slingbox on the comcast internet box.    What is the thing in their movies that the yellow blue and white things go into?
    Bestbuy phone does not work They shift you from one person to another over   At this point they have been shifting me back and forth for 35 minutes.

    Comcast internet box?
    Um, it would go between your cable box and the router.
    Some comcast HD boxes might not have SD composite outputs any more, and if the colors yellow and white are involved, the Slingbox is probably a standard def version.
    Without knowing:
    Exactly which model of cable box you have
    Exactly which model of Slingbox you have (there are multiple versions, some with high def component inputs and some without)
    It's not possible to help you.
    In general, it should be, for a standard definition setup:
    Composite video output from cable box (yellow RCA jack) to composite video input of Slingbox
    Audio outputs from cable box (Analog stereo is two RCA jacks, red and white usually) to Slingbox inputs - Optical digital audio may be another option depending on the Slingbox
    Ethernet (looks like a large telephone jack) from Slingbox to a LAN port on your router
    If you have an HD slingbox, then the single yellow RCA would get replaced with the red/green/blue RCAs for component (YPrPb) video.
    *disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies.

  • Want to process cube on one box and have it available on another box to browse.

    I am interested in processing the cubes on one box and then have them available on another box for browsing to avoid slowness while the ETL or cube process is running. Any ideas?
    ravi

    Have a look at the SSAS Database Synchronization.
    http://technet.microsoft.com/en-us/library/ms174928.aspx
    Related links:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f92533da-3bb0-4c60-b3cc-e8afe9ec1b60/automate-backuprestore-ssas-databasesall-in-2008-r2?forum=sqlanalysisservices
    http://www.mssqltips.com/sqlservertip/2938/how-to-synchronize-two-ssas-servers/
    http://sqlvoyager.wordpress.com/2012/08/11/ssas-implementing-analysis-services-synchronization/
    Karthik

  • How can I take a text message and either print it out or forward it to my email address

    I need to save the text message for proof of conversation in the future

    shaun2178 wrote:
    Thank you for the responses. I am not sure if I optimized the video, but I'm not quite sure how to do that. Maybe that would fix my problem. I shot in 4k, but Divinci Resolve light only allows you to export in 1080p. The full version allows for 4k.
    If it has gone down to 15 fps, I don't know how or why. I want the final product to be 24 fps.
    The question I think that would fix my issue is, How do I make my 4k, 2k, and 1080p, mixed project and make the entire thing 1080p? I hope someone will be able to answer this. I'm sure it's a simple fix. I'm just ignorant of how to make this possible.
    I have to dash out now... Deviance Resolve Lite allows for 4k output...
    XML from FCP X:
    XML output from Resolve:

Maybe you are looking for

  • V function and dates

    I'm very much new to APEX and I've been looking into a performance issue our external APEX app is having, so if someone has any advice I would be very grateful. I've narrowed the issue down to one page which uses a report region. This report runs an

  • Activity Journal Template missing

    Hi To configure Activity I have done required settings & earlier I was able to see activity journal template in  activity transaction.But now I am not able to see any template in activity journal tab. Can any one help me. Regards, Natasha

  • Application time out

    Hi Experts, We have a requirement in which we have to give the option to customer to set application timeout according to there requirement. We have webdynpro application. Could you please tell me how we can achieve this. Thanks, Sudhanshu

  • Serial number issues with photoshop elements 12

    I purchased the student edition of photoshop elements 12 and premier elements 12.  The guided download process only installed the premier portion, and not photoshop.  I downloaded the trial version and attempted to apply the serial number, but that d

  • Error Creating the VM

    I'm getting following error when creating a VM. Any help will be appreciated. Please note that I have upgraded the Oracle VM manager and after that I'm getting this error. I already have 4 VMs on same server and these are running fine. When ever I cr