Search Results

Search found 2932 results on 118 pages for 'solled scroll'.

Page 45/118 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • scrollable banner using buttons and mouse scroller

    - by Psinyee
    I'm creating a scrollable banner for my homepage with 'up' and 'down' button for user to scroll the banner. How do I make it so that the mouse scroller is able to scroll the banner too and also once I click on the down or up button the user will be able to see the transition of the banner scrolling upwards or downwards? scroll script: <script> var t = 0; function up() { t += 600; with(document.getElementById("contents")) { if (t > 0) t = 0; if(style) style.top = t + "px"; else setAttribute("style", "top: " + t + "px"); } } function down() { t -= 600; with(document.getElementById("contents")) { if(t < -clientHeight) t = -clientHeight; if(style) style.top = t + "px"; else setAttribute("style", "top: " + t + "px"); } } </script> scrollable banner: <table width="950px" height="600px"> <tr> <td valign="top"> <div id="scrollable" style="height:600px; width:950px"> <div id="contents" style="height:600px; width:950px"> <table bgcolor="#dcdcdc" width="950px" height="600px"> <tr> <td height="490px"></td> </tr> <tr> <td height="100px"><img src="images/banner_title.png"/></td> </tr> </table> <table bgcolor="#ffd07e" width="950px" height="600px"> <tr> <td height="490px"></td> </tr> <tr> <td height="100px"><img src="images/banner_title.png"/></td> </tr> </table> buttons: <table> <tr> <td width="30px"><a href="javascript:void(0)" onClick="up()"><img src="images/arrow_up.png"/></a></td> <td width="30px"><a href="javascript:void(0)" onClick="down()"><img src="images/arrow_down.png"/></a></td> </tr> </table>

    Read the article

  • How to make an element slide with the viewport as it scrolls?

    - by alex
    I've Googled for this but must be using the wrong keywords. Basically I want to use the effect that Magento and now Stack Overflow uses. That is, there is an element in a column, and when you scroll down, it sticks to the top of the viewport. And once scrolled up again, it goes back into the normal page flow. This Ask A Question is a good page for example. Scroll down and watch the "How to Format" element come down (might need to make your viewport smaller if you have a large screen to see the effect). I've noticed it is setting position: fixed in the CSS. The JavaScript however is obfuscated. What's the easiest way to achieve this effect? Is there a jQuery plugin available?

    Read the article

  • How do I change the background image of my app?

    - by user356387
    Hello I have looked around and found some code which so called chooses an image from an array of image objects, but cant find an explanation. I would like to make my app have a background image and the user can select next and previous buttons to scroll through some full screen images, setting them as the background image as they scroll. I know how to do this in java, but cant seem to do it for this app. How or what code is linked to a next button to grab the next image in the array and reverse for the back button? Then that needs to be displayed obviously. I have used a layered architecture with a MVC style approach but cant seem to put it together with Objective-C. Would the buttons call the appropriate methods of the so called delegates, which the delegates handle fetching and returning the Images? Would the buttons use the returned images and actually handle the redrawing? I would really appreciate the help. Regards Jarryd

    Read the article

  • Is it possible to align an element with the bottom of the window, yet make it scrollable, with CSS o

    - by last-child
    I have a design going on where I want to align the bottom of an intro paragraph with the bottom of the window, yet make it scroll with the rest of the page. So when the page opens, the visitor sees only the first paragraph (and a full screen background image, which is what I want to focus their attention on), but as they scroll they see the paragraph and the rest of the text. The height of the intro element can vary. Right now I think I have to introduce some javascript to do this - meassure the height of the window, the height of the paragraph, and adjust top: or margin-top of the paragraph to the difference between the two values. If there is a way to make a div have a height that corresponds exactly to the window height, and position the paragraph absolutely inside of this div, the let the rest of the text sit outside of the div, it could work... but I can't seem to make that happen with css. Any suggestions?

    Read the article

  • best way to make this app/website combo?

    - by mharris7190
    I have an idea for an app that lets different bars upload drink specials via a webpage to that app. They would log in the website, and the website would prompt them with a box to input the drink specials. When they are done, the app pulls the information and creates a card for that bar. The app would launch into a week view where you select the day you want to see specials for. After the day is selected, it brings you to a scroll view with different bars' cards laid out vertically, each taking up the width of the screen, allowing the user to scroll through the deals for that day of the week. How should I go about doing this if I have very little programming experience? Is there any convention in doing an app like this? Can anyone suggest any reading material that would help? Thank you!

    Read the article

  • Why is the page shifting to top with a container that has overflow:hidden ?

    - by Maher4Ever
    I'm facing a problem that's really strange. It's in every browser. Everything is working correctly, until you try to go to a section using the hash ( like #contactUs in my page)... try this url : http://mahersalam.co.cc/projects/2011/#contactUs You will see that the page SHIFTS 10px to the top. if you take the hash, it works again. I have a wrapper on the page (#container) that has overflow:hidden, I did it to make sure no scroll bars appear if the resolution change. If you remove the overflow property it works too. I guess the shifting happens through the place of the scroll bar, but because it's hidden it's place only stays. So does anyone knows how to fix this problem ?

    Read the article

  • Setting the size of a silverlight window at runtime automatically?

    - by dilbert789
    I need to be able to change the size of my Silverlight object at run time because I have content that changes in size dramatically between pages, and I'd rather not show a Silverlight scroll bar inside the browser scroll bar. I was able to do the following to get it to work: In the aspx page hosting the silverlight control: - Set your Div to the starting size you need it to be - Set the Silverlight Obejct to width=”100%” height=”100%” In your Main page add this: public static void ChangeSize(string height) { var myDiv = HtmlPage.Plugin.Parent; while (myDiv.TagName != "div") myDiv = myDiv.Parent; myDiv.SetStyleAttribute("height", height); } Anywhere you want to now change the size of the page do this: string newHeight = (App.Current.Host.Content.ActualHeight + 75).ToString(); MainPage.ChangeSize(newHeight + "px"); //App.Current.Host.Content.ActualHeight will get the current actual height of the object Is there a way that I can set this to re-size automatically so that I do not have to specify the amount to change? Currently using SL 2, interested in if there is another way in a different version though.

    Read the article

  • Sidescrolling UI on iPhone

    - by Michael
    Please lead me in the right direction. I need to provide user with small text centered on the iPhone screen. User can make quick scroll left or right in order to get the next or previous text. There can be hundreds of such text pieces. The process itself is similar to Photo application sidescrolling but much simple, no zoom. As far as I can understand I need to use UIScrollView class, then call hundreds of addSubviews? Is it the optimal way or I should always keep 3 subviews and replace them on the fly? What kind of tricks should be used to achieve the "scroll and center" effect? Thanks

    Read the article

  • MS Access Can't move to a different record?

    - by user986706
    Ok, I'm really baffled. Here's the rundown: I've created a form with a subform. The main form is called FacilityInfo, and the subform is called BillingInfo. The forms are linked via 3 fields, AffiliateID, ClientID, and FacilityID. the subform shows one record at a time, set to show Continuous Forms, and AllowAdditions = No I can see that there are 4 records in the nav bar. But Access won't let me move off the first record. I've tried setting to Single Form. I've tried AllowAdditions = Yes. I do have a Vertical Scroll bar on the subform. It will allow me to scroll through the records, but I can only see them. I cannot move to one of the controls. Any ideas? I'm freakin' out! Thanks in advance!

    Read the article

  • Large Data Table with first column fixed

    - by bhavya_w
    I have structure as shown in the fiddle http://jsfiddle.net/5LN7U/. <section class="container"> <section class="field"> <ul> <li> Question 1 </li> <li> question 2 </li> <li> question 3 </li> <li> question 4 </li> <li> question 5 </li> <li> question 6 </li> <li> question 7 </li> </ul> </section> <section class="datawrap"> <section class="datawrapinner"> <ul> <li><b>Answer 1 :</b></li> <li><b>Answer 2 :</b></li> <li><b>Answer 3 :</b></li> <li><b>Answer 4 :</b></li> <li><b>Answer 5 :</b></li> <li><b>Answer 6 :</b></li> <li><b>Answer 7 :</b></li> </ul> </section> </section> </section> Basically its a table structure made using divs. The first column contains a long list of questions and the second column contains answers/multiple answers which can be quite big ( there has to be horizontal scrolling in the second column.) The problem i am facing is when i scroll downwards the second column which has the horizontal scroll bar is also scrolling downward. I want horizontal scrollbar to be fixed there. as in it should be always fixed there no matter how much i scroll vertically. Much Like Google Spreadsheets: where the first column stays fixed and there's horizontal scrolling on rest of the columns with over vertical scrolling for whole of the data. I cannot used position fixed in the second column. P.S : please no lectures on using div's for making a table structure. I have my own reasons. and its kinda urgent. Thanks in advance.

    Read the article

  • Download Microsoft’s Series of ‘Work Smart’ Guides for Windows 8

    - by Asian Angel
    The general release date for Windows 8 is almost here and Microsoft has released a terrific set of free ‘Work Smart’ guides to help you get started with the new operating system. Whether it is an overview of Windows 8 itself, shortcut keys, backups, and more these guides cover a nice range of topics. HTG Explains: How Antivirus Software Works HTG Explains: Why Deleted Files Can Be Recovered and How You Can Prevent It HTG Explains: What Are the Sys Rq, Scroll Lock, and Pause/Break Keys on My Keyboard?

    Read the article

  • Disable Opera Thumbnail Previews on Windows 7 Taskbar

    - by Asian Angel
    If you are one of the people who does not care for the Taskbar Thumbnail Previews in Windows 7 then we have a quick and easy way for you to turn them off in Opera Browser. Before Here is our Opera Browser with four tabs full of HTG Network goodness… Hovering the mouse over the Taskbar Icon gives a nice preview of each tabs content. Looking closer you can see the fanned edge on the Taskbar Icon indicating that there are multiple tabs open. This is all good but what if you just want something simpler? Disabling the Previews If you want to disable the Taskbar Thumbnail Previews in Opera you will need to type opera:config in the Address Bar and press Enter. Once you have done that, you will see a condensed listing for all of Opera’s preferences. There is one Preference Category that we need to look for…User Prefs. Note: While a Quick Find Search could be conducted for the entry that needs to be modified, we have chosen to show the full method here. After scrolling down and finding the User Prefs category you will need to expand the section. Notice the size of the scrollbar in comparison with the screenshot above…there is quite a lot that you can look at and finesse in Opera if desired. Scroll down until you find the Use Windows 7 Taskbar Thumbnails entry. Uncheck the box but do not close the opera:config Tab yet…or your changes will not take effect. Scroll down once more until you reach the end of the User Prefs category and click Save. With this particular modification you will need to restart Opera after clicking OK. After restarting Opera the Taskbar Icon and Taskbar Thumbnail Preview will revert to the minimal Windows 7 default as shown here. You can see Opera’s Tab Bar in the thumbnail and the Taskbar Icon no longer has a “fanned edge”. Conclusion If you want to disable Opera’s Taskbar Thumbnail Previews on your Windows 7 system, then this quick modification will help get it sorted out in just a few moments. Similar Articles Productive Geek Tips Disable IE 8 Thumbnail Previews on Windows 7 TaskbarIncrease the size of Taskbar Preview Thumbnails in Windows 7Vista Style Popup Previews for Firefox TabsEnable Thumbnail Previews for Firefox in Windows 7 TaskbarWorkaround for Vista Taskbar Thumbnail Previews Not Showing Correctly TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 VMware Workstation 7 10 Superb Firefox Wallpapers OpenDNS Guide Google TV The iPod Revolution Ultimate Boot CD can help when disaster strikes Windows Firewall with Advanced Security – How To Guides

    Read the article

  • Add a Sleep Timer to Windows 7 Media Center

    - by DigitalGeekery
    Do you make it a habit of falling asleep at night while watching Windows Media Center? Today we are going to take a look at the MC7 Sleep Timer for Windows 7 Media Center. This simple little plugin allows you to schedule an automatic shutdown time in Media Center. Note: At this point MC7 Sleep Timer doesn’t work with extenders. If you’re using ClamAV or Panda it may detect this plugin as a virus, we’ve tested it and this is a false positive for these two antivirus apps. Installation and Usage Download and install MC7 Sleep Timer. (See download below) After the installation is finished, you will find MC7 Sleep Timer located in the Media Center Extras Library. Click on the tile to open the timer and configure your settings. The MC7 Sleep Timer will open in full screen mode. You can choose to shutdown the PC after 30 or 60 minutes, create a custom length shutdown timer at any 5 minute interval, or select the exact time you want the PC to shutdown.  After setting your PC to shutdown, you’ll get an audio confirmation. To set a custom timer length, scroll to the “Custom timer” option and click right or left on your Media Center remote or, the right or left arrow keys, to choose how many minutes before shutdown. To schedule a shutdown for a certain time, browse to the “Shutdown at time” button, and scroll right or left with the arrow keys on the keyboard or remote. When you’ve chosen your time, hit “Enter” on the keyboard or “OK” on the remote.   Clicking the “Monitor Off” button will turn off only the monitor and “Cancel Timer” will cancel your shutdown request. Conclusion If you often find yourself falling asleep every night watching Media Center and then fumbling and stumbling in the middle of the night to shutdown your computer, MC7 Sleep timer might just be a perfect addition to your Media Center setup. Download MC7 Sleep Timer Similar Articles Productive Geek Tips Using Netflix Watchnow in Windows Vista Media Center (Gmedia)Re-Enable Sleep Mode in Windows VistaSchedule Updates for Windows Media CenterIntegrate Hulu Desktop and Windows Media Center in Windows 7Add Color Coding to Windows 7 Media Center Program Guide TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 PCmover Professional Use My TextTools to Edit and Organize Text Discovery Channel LIFE Theme (Win7) Increase the size of Taskbar Previews (Win 7) Scan your PC for nasties with Panda ActiveScan CleanMem – Memory Cleaner AceStock – The Personal Stock Monitor

    Read the article

  • What's the recommended way to configure a Synaptics touchpad device?

    - by htorque
    I want to increase the scroll area by moving the so-called RightEdge a bit towards the middle. Right now I'm doing this via a one-liner that's called at session start (added via gnome-session-properties): xinput --set-prop --type=int --format=32 11 252 1781 5125 1646 4582 This works fine, but feels like a hack. What's the recommended way to edit/set touchpad device properties like this one? Few years ago I'd have put that into the xorg.conf, but this seems to be discouraged nowadays.

    Read the article

  • From the Tips Box: Monitoring Android Battery Use, DIY Camera Stabilizers, and Decluttering Pages in Chrome

    - by Jason Fitzpatrick
    Once a week we round up some of the tips and tricks you mail in and share them with everyone. This week we’re looking at monitoring your Android device’s battery, DIY camera stabilizers, and a handy Chrome tool for tidying up web pages. HTG Explains: How Antivirus Software Works HTG Explains: Why Deleted Files Can Be Recovered and How You Can Prevent It HTG Explains: What Are the Sys Rq, Scroll Lock, and Pause/Break Keys on My Keyboard?

    Read the article

  • How to use gestures on gnome shell?

    - by Mauricio Andrés
    I have installed Ubuntu 12.10 on my Acer Apsire V5 touch, and I want to know hot to activate the gestures on my clickpad in Gnome SHell, because in Unity I can use them with no problems. So, is there a way to use the gestures on Gnome Shell? Gestures: Pinch to Zoom Move windows with 3 fingers "Natural scroll" etc... And if it's possible to fully use the touch screen, because it fails when I do a click on it.

    Read the article

  • Implementing camera for 2d side scroller game ?

    - by Mr.Gando
    Hello, I'm implementing a 2D side scroller for iOS (using C/C++ with OpenGL) (beat'em up style like double dragon/final fight ). My scenes are composed of one cyclical background image ( the end of the image connects perfectly with the beginning ). This is to produce a cyclical scroll effect. I was wondering how could I implement a camera that follows my player movement ? ( Resources / Links are greatly appreciated with explanations :) )

    Read the article

  • Silverlight Cream for November 17, 2011 -- #1168

    - by Dave Campbell
    In this Issue: Colin Eberhardt, Lazar Nikolov, WindowsPhoneGeek, Jesse Liberty, Peter Kuhn, Derik Whittaker, Chris Koenig, and Jeff Blankenburg(-2-). Above the Fold: Silverlight: "Facebook Graph API and Silverlight Part 2 – Publishing data" Lazar Nikolov WP7: "Suppressing Zoom and Scroll interactions in the Windows Phone 7 WebBrowser Control" Colin Eberhardt Metro/WinRT/W8: "Tip/Trick when working with the Application Bar in WinRT/Metro (C#)" Derik Whittaker Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up Pete Brown announced the completion of his book: It’s a wrap! I’ve completed writing Silverlight 5 in Action From SilverlightCream.com: Suppressing Zoom and Scroll interactions in the Windows Phone 7 WebBrowser Control Colin Eberhardt's latest post is all about a helper class he wrote to suppress scrolling and pinch zoom of the WP7 browser control, which you might want to do if the browser is placed inside another control. Facebook Graph API and Silverlight Part 2 – Publishing data In this part 2 of his Facebook and Silverlight series, Lazar Nikolov shows how to post data to your profile or your friends' profiles Localizing a Windows Phone app Step by Step WindowsPhoneGeek's latest post is on Localizing a WP7 app .. another great tutorial with plenty of discussion, pictures, and a project to load up and follow Background Audio Part II: Copying Audio Files To Isolated Storage Continuing his WP7 series, Jesse Liberty has Part 2 of a mini-series on Background Audio up... in this episode he's using local audio and to do so, it must be in ISO Silverlight: Bugs in the multicast client In a Q/A session, Peter Kuhn was presented a nasty bug in the multicast client that he has verified exists in not only Silverlight 4 but also Silverlight 5 Beta, including a link to his entry on Connect. Tip/Trick when working with the Application Bar in WinRT/Metro (C#) Derik Whittaker offers up some good information about the Metro Application Bar and how to keep it where you want it New! Windows Phone Starter Kit for Podcasts Chris Koenig announced the release of a new starter kit for WP7... a starter kit for podcasts. Check out the links on Chris' site and the other two starter kits that are available 31 Days of Mango | Day #4: Compass Jeff Blankenburg continues with Day 4 of his Mango series with this post on the Compass and a cool app to demonstrate it 31 Days of Mango | Day #5: Gyroscope In Day 5, Jeff Blankenburg is talking about and discussing the gyroscope, of course if you have a phone as old as mine, you won't have a gyroscope and it's not on the emulator Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Star Wars – Battle of Hoth Recreated in Minecraft [Video]

    - by Asian Angel
    Star Wars and Minecraft each stand out on their own, but what if you combine the two into one awesome video? Enjoy the result with this video that YouTube user ParadiseDecay has created. Minecraft – Star Wars – Battle For Hoth [via Dorkly] HTG Explains: How Antivirus Software Works HTG Explains: Why Deleted Files Can Be Recovered and How You Can Prevent It HTG Explains: What Are the Sys Rq, Scroll Lock, and Pause/Break Keys on My Keyboard?

    Read the article

  • iPhone SDK vs. Windows Phone 7 Series SDK Challenge, Part 2: MoveMe

    In this series, I will be taking sample applications from the iPhone SDK and implementing them on Windows Phone 7 Series.  My goal is to do as much of an apples-to-apples comparison as I can.  This series will be written to not only compare and contrast how easy or difficult it is to complete tasks on either platform, how many lines of code, etc., but Id also like it to be a way for iPhone developers to either get started on Windows Phone 7 Series development, or for developers in general to learn the platform. Heres my methodology: Run the iPhone SDK app in the iPhone Simulator to get a feel for what it does and how it works, without looking at the implementation Implement the equivalent functionality on Windows Phone 7 Series using Silverlight. Compare the two implementations based on complexity, functionality, lines of code, number of files, etc. Add some functionality to the Windows Phone 7 Series app that shows off a way to make the scenario more interesting or leverages an aspect of the platform, or uses a better design pattern to implement the functionality. You can download Microsoft Visual Studio 2010 Express for Windows Phone CTP here, and the Expression Blend 4 Beta here. If youre seeing this series for the first time, check out Part 1: Hello World. A note on methodologyin the prior post there was some feedback about lines of code not being a very good metric for this exercise.  I dont really disagree, theres a lot more to this than lines of code but I believe that is a relevant metric, even if its not the ultimate one.  And theres no perfect answer here.  So I am going to continue to report the number of lines of code that I, as a developer would need to write in these apps as a data point, and Ill leave it up to the reader to determine how that fits in with overall complexity, etc.  The first example was so basic that I think it was difficult to talk about in real terms.  I think that as these apps get more complex, the subjective differences in concept count and will be more important.  MoveMe The MoveMe app is the main end-to-end app writing example in the iPhone SDK, called Creating an iPhone Application.  This application demonstrates a few concepts, including handling touch input, how to do animations, and how to do some basic transforms. The behavior of the application is pretty simple.  User touches the button: The button does a throb type animation where it scales up and then back down briefly. User drags the button: After a touch begins, moving the touch point will drag the button around with the touch. User lets go of the button: The button animates back to its original position, but does a few small bounces as it reaches its original point, which makes the app fun and gives it an extra bit of interactivity. Now, how would I write an app that meets this spec for Windows Phone 7 Series, and how hard would it be?  Lets find out!     Implementing the UI Okay, lets build the UI for this application.  In the HelloWorld example, we did all the UI design in Visual Studio and/or by hand in XAML.  In this example, were going to use the Expression Blend 4 Beta. You might be wondering when to use Visual Studio, when to use Blend, and when to do XAML by hand.  Different people will have different takes on this, but heres mine: XAML by hand simple UI that doesnt contain animations, gradients, etc., and or UI that I want to really optimize and craft when I know exactly what I want to do. Visual Studio Basic UI layout, property setting, data binding, etc. Blend Any serious design work needs to be done in Blend, including animations, handling states and transitions, styling and templating, editing resources. As in Part 1, go ahead and fire up Visual Studio 2010 Express for Windows Phone (yes, soon it will take longer to say the name of our products than to start them up!), and create a new Windows Phone Application.  As in Part 1, clear out the XAML from the designer.  An easy way to do this is to just: Click on the design surface Hit Control+A Hit Delete Theres a little bit left over (the Grid.RowDefinitions element), just go ahead and delete that element so were starting with a clean state of only one outer Grid element. To use Blend, we need to save this project.  See, when you create a project with Visual Studio Express, it doesnt commit it to the disk (well, in a place where you can find it, at least) until you actually save the project.  This is handy if youre doing some fooling around, because it doesnt clutter your disk with WindowsPhoneApplication23-like directories.  But its also kind of dangerous, since when you close VS, if you dont save the projectits all gone.  Yes, this has bitten me since I was saving files and didnt remember that, so be careful to save the project/solution via Save All, at least once. So, save and note the location on disk.  Start Expression Blend 4 Beta, and chose File > Open Project/Solution, and load your project.  You should see just about the same thing you saw over in VS: a blank, black designer surface. Now, thinking about this application, we dont really need a button, even though it looks like one.  We never click it.  So were just going to create a visual and use that.  This is also true in the iPhone example above, where the visual is actually not a button either but a jpg image with a nice gradient and round edges.  Well do something simple here that looks pretty good. In Blend, look in the tool pane on the left for the icon that looks like the below (the highlighted one on the left), and hold it down to get the popout menu, and choose Border:    Okay, now draw out a box in the middle of the design surface of about 300x100.  The Properties Pane to the left should show the properties for this item. First, lets make it more visible by giving it a border brush.  Set the BorderBrush to white by clicking BorderBrush and dragging the color selector all the way to the upper right in the palette.  Then, down a bit farther, make the BorderThickness 4 all the way around, and the CornerRadius set to 6. In the Layout section, do the following to Width, Height, Horizontal and Vertical Alignment, and Margin (all 4 margin values): Youll see the outline now is in the middle of the design surface.  Now lets give it a background color.  Above BorderBrush select Background, and click the third tab over: Gradient Brush.  Youll see a gradient slider at the bottom, and if you click the markers, you can edit the gradient stops individually (or add more).  In this case, you can select something you like, but wheres what I chose: Left stop: #BFACCFE2 (I just picked a spot on the palette and set opacity to 75%, no magic here, feel free to fiddle these or just enter these numbers into the hex area and be done with it) Right stop: #FF3E738F Okay, looks pretty good.  Finally set the name of the element in the Name field at the top of the Properties pane to welcome. Now lets add some text.  Just hit T and itll select the TextBlock tool automatically: Now draw out some are inside our welcome visual and type Welcome!, then click on the design surface (to exit text entry mode) and hit V to go back into selection mode (or the top item in the tool pane that looks like a mouse pointer).  Click on the text again to select it in the tool pane.  Just like the border, we want to center this.  So set HorizontalAlignment and VerticalAlignment to Center, and clear the Margins: Thats it for the UI.  Heres how it looks, on the design surface: Not bad!  Okay, now the fun part Adding Animations Using Blend to build animations is a lot of fun, and its easy.  In XAML, I can not only declare elements and visuals, but also I can declare animations that will affect those visuals.  These are called Storyboards. To recap, well be doing two animations: The throb animation when the element is touched The center animation when the element is released after being dragged. The throb animation is just a scale transform, so well do that first.  In the Objects and Timeline Pane (left side, bottom half), click the little + icon to add a new Storyboard called touchStoryboard: The timeline view will appear.  In there, click a bit to the right of 0 to create a keyframe at .2 seconds: Now, click on our welcome element (the Border, not the TextBlock in it), and scroll to the bottom of the Properties Pane.  Open up Transform, click the third tab ("Scale), and set X and Y to 1.2: This all of this says that, at .2 seconds, I want the X and Y size of this element to scale to 1.2. In fact you can see this happen.  Push the Play arrow in the timeline view, and youll see the animation run! Lets make two tweaks.  First, we want the animation to automatically reverse so it scales up then back down nicely. Click in the dropdown that says touchStoryboard in Objects and Timeline, then in the Properties pane check Auto Reverse: Now run it again, and youll see it go both ways. Lets even make it nicer by adding an easing function. First, click on the Render Transform item in the Objects tree, then, in the Property Pane, youll see a bunch of easing functions to choose from.  Feel free to play with this, then seeing how each runs.  I chose Circle In, but some other ones are fun.  Try them out!  Elastic In is kind of fun, but well stick with Circle In.  Thats it for that animation. Now, we also want an animation to move the Border back to its original position when the user ends the touch gesture.  This is exactly the same process as above, but just targeting a different transform property. Create a new animation called releaseStoryboard Select a timeline point at 1.2 seconds. Click on the welcome Border element again Scroll to the Transforms panel at the bottom of the Properties Pane Choose the first tab (Translate), which may already be selected Set both X and Y values to 0.0 (we do this just to make the values stick, because the value is already 0 and we need Blend to know we want to save that value) Click on RenderTransform in the Objects tree In the properties pane, choose Bounce Out Set Bounces to 6, and Bounciness to 4 (feel free to play with these as well) Okay, were done. Note, if you want to test this Storyboard, you have to do something a little tricky because the final value is the same as the initial value, so playing it does nothing.  If you want to play with it, do the following: Next to the selection dropdown, hit the little "x (Close Storyboard) Go to the Translate Transform value for welcome Set X,Y to 50, 200, respectively (or whatever) Select releaseStoryboard again from the dropdown Hit play, see it run Go into the object tree and select RenderTransform to change the easing function. When youre done, hit the Close Storyboard x again and set the values in Transform/Translate back to 0 Wiring Up the Animations Okay, now go back to Visual Studio.  Youll get a prompt due to the modification of MainPage.xaml.  Hit Yes. In the designer, click on the welcome Border element.  In the Property Browser, hit the Events button, then double click each of ManipulationStarted, ManipulationDelta, ManipulationCompleted.  Youll need to flip back to the designer from code, after each double click. Its code time.  Here we go. Here, three event handlers have been created for us: welcome_ManipulationStarted: This will execute when a manipulation begins.  Think of it as MouseDown. welcome_ManipulationDelta: This executes each time a manipulation changes.  Think MouseMove. welcome_ManipulationCompleted: This will  execute when the manipulation ends. Think MouseUp. Now, in ManipuliationStarted, we want to kick off the throb animation that we called touchAnimation.  Thats easy: 1: private void welcome_ManipulationStarted(object sender, ManipulationStartedEventArgs e) 2: { 3: touchStoryboard.Begin(); 4: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Likewise, when the manipulation completes, we want to re-center the welcome visual with our bounce animation: 1: private void welcome_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e) 2: { 3: releaseStoryboard.Begin(); 4: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Note there is actually a way to kick off these animations from Blend directly via something called Triggers, but I think its clearer to show whats going on like this.  A Trigger basically allows you to say When this event fires, trigger this Storyboard, so its the exact same logical process as above, but without the code. But how do we get the object to move?  Well, for that we really dont want an animation because we want it to respond immediately to user input. We do this by directly modifying the transform to match the offset for the manipulation, and then well let the animation bring it back to zero when the manipulation completes.  The manipulation events do a great job of keeping track of all the stuff that you usually had to do yourself when doing drags: where you started from, how far youve moved, etc. So we can easily modify the position as below: 1: private void welcome_ManipulationDelta(object sender, ManipulationDeltaEventArgs e) 2: { 3: CompositeTransform transform = (CompositeTransform)welcome.RenderTransform; 4:   5: transform.TranslateX = e.CumulativeManipulation.Translation.X; 6: transform.TranslateY = e.CumulativeManipulation.Translation.Y; 7: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Thats it! Go ahead and run the app in the emulator.  I suggest running without the debugger, its a little faster (CTRL+F5).  If youve got a machine that supports DirectX 10, youll see nice smooth GPU accelerated graphics, which also what it looks like on the phone, running at about 60 frames per second.  If your machine does not support DX10 (like the laptop Im writing this on!), it wont be quite a smooth so youll have to take my word for it! Comparing Against the iPhone This is an example where the flexibility and power of XAML meets the tooling of Visual Studio and Blend, and the whole experience really shines.  So, for several things that are declarative and 100% toolable with the Windows Phone 7 Series, this example does them with code on the iPhone.  In parens is the lines of code that I count to do these operations. PlacardView.m: 19 total LOC Creating the view that hosts the button-like image and the text Drawing the image that is the background of the button Drawing the Welcome text over the image (I think you could technically do this step and/or the prior one using Interface Builder) MoveMeView.m:  63 total LOC Constructing and running the scale (throb) animation (25) Constructing the path describing the animation back to center plus bounce effect (38) Beyond the code count, yy experience with doing this kind of thing in code is that its VERY time intensive.  When I was a developer back on Windows Forms, doing GDI+ drawing, we did this stuff a lot, and it took forever!  You write some code and even once you get it basically working, you see its not quite right, you go back, tweak the interval, or the math a bit, run it again, etc.  You can take a look at the iPhone code here to judge for yourself.  Scroll down to animatePlacardViewToCenter toward the bottom.  I dont think this code is terribly complicated, but its not what Id call simple and its not at all simple to get right. And then theres a few other lines of code running around for setting up the ViewController and the Views, about 15 lines between MoveMeAppDelegate, PlacardView, and MoveMeView, plus the assorted decls in the h files. Adding those up, I conservatively get something like 100 lines of code (19+63+15+decls) on iPhone that I have to write, by hand, to make this project work. The lines of code that I wrote in the examples above is 5 lines of code on Windows Phone 7 Series. In terms of incremental concept counts beyond the HelloWorld app, heres a shot at that: iPhone: Drawing Images Drawing Text Handling touch events Creating animations Scaling animations Building a path and animating along that Windows Phone 7 Series: Laying out UI in Blend Creating & testing basic animations in Blend Handling touch events Invoking animations from code This was actually the first example I tried converting, even before I did the HelloWorld, and I was pretty surprised.  Some of this is luck that this app happens to match up with the Windows Phone 7 Series platform just perfectly.  In terms of time, I wrote the above application, from scratch, in about 10 minutes.  I dont know how long it would take a very skilled iPhone developer to write MoveMe on that iPhone from scratch, but if I was to write it on Silverlight in the same way (e.g. all via code), I think it would likely take me at least an hour or two to get it all working right, maybe more if I ended up picking the wrong strategy or couldnt get the math right, etc. Making Some Tweaks Silverlight contains a feature called Projections to do a variety of 3D-like effects with a 2D surface. So lets play with that a bit. Go back to Blend and select the welcome Border in the object tree.  In its properties, scroll down to the bottom, open Transform, and see Projection at the bottom.  Set X,Y,Z to 90.  Youll see the element kind of disappear, replaced by a thin blue line. Now Create a new animation called startupStoryboard. Set its key time to .5 seconds in the timeline view Set the projection values above to 0 for X, Y, and Z. Save Go back to Visual Studio, and in the constructor, add the following bold code (lines 7-9 to the constructor: 1: public MainPage() 2: { 3: InitializeComponent(); 4:   5: SupportedOrientations = SupportedPageOrientation.Portrait; 6:   7: this.Loaded += (s, e) => 8: { 9: startupStoryboard.Begin(); 10: }; 11: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } If the code above looks funny, its using something called a lambda in C#, which is an inline anonymous method.  Its just a handy shorthand for creating a handler like the manipulation ones above. So with this youll get a nice 3D looking fly in effect when the app starts up.  Here it is, in flight: Pretty cool!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • When using Zoom, cursor disappears

    - by Lea
    In Ubuntu 12.04 Unity, when I use the Compiz Zoom feature, the mouse cursor disappears. This did not happen in 10.04, it worked great until I installed 12.04. In 12.04 zoom was disabled by default, so I re-enabled it to use Super+scroll wheel as it was before. The only thing different now is that the shortcut listing appears while zooming, zooming is not as smooth, and I have no mouse cursor. How can I get the cursor to remain visible while zoomed in?

    Read the article

  • SCCM 2007 Collections per OU

    - by VirtualizeIT
    Recently I wanted to create our SCCM collections setup as our Active Directory structure. I finally figured out how to create collections per OU of the domain. I decided to create a simple tutorial that may help other IT professionals the steps to complete this task.   1. Open the ConfigMgr and navigation to the collections. To navigate to the collections go to Site Database>Computer Management>Collections. 2. In the ‘Collections’ right-click and select New Collections. Then it will pop up a Wizards so you can enter the name of the collection and any notes that you may want to add that is associated with the collection.                       3. Next, select the database icon. In the ‘Name’ textbox enter the name of the query. I named mine ‘Query’ just for simplicity sake. After you enter the name select ‘Edit Query Statement…’ 4. Select the ‘Criteria’ tab 5. Select the icon that looks like a sun. 6. At this point you should see a dialog box like this…                     7. Next, click the ‘select’ button. 8. Under the ‘Attribute class’ scroll through until you see ’System Resource’ and for the ‘Attribute"’ scroll through you see ‘System OU Name’. It should look something like this…                 9. After that select OK. 10. In the ‘Value’ textbox enter the string that is associated with the OU in your domain. NOTE: If you don’t know your string name for your OU you can simply go to “Active Directory Users and Computers” and right-click on the OU and select properties. In the ‘object’ tab you should see the string under the ‘Canonical name of object”. That is the string that you put in the ‘Value’ text box. 11. After you enter the OU string name press OK>OK>OK>NEXT>NEXT>FINISH.   That’s it!   I hope this tutorial has help you understand how to create a collection through your OU structure.

    Read the article

  • Stencil buffer appears to not be decrementing values correctly

    - by Alex Ames
    I'm attempting to use the stencil buffer as a clipper for my UI system, but I'm having trouble debugging a problem I'm running in to. This is what I'm doing: A widget can pass a rectangle to the the stencil clipper functions, which will increment the stencil buffer values that it covers. Then it will draw its children, which will only get drawn in the stencilled area (so that if they extend outside they'll be clipped). After a widget is done drawing its children, it pops that rectangle from the stack and in the process decrements the values in the stencil buffer that it has previously incremented. The slightly simplified code is below: static void drawStencil(Rect& rect, unsigned int ref) { // Save previous values of the color and depth masks GLboolean colorMask[4]; GLboolean depthMask; glGetBooleanv(GL_COLOR_WRITEMASK, colorMask); glGetBooleanv(GL_DEPTH_WRITEMASK, &depthMask); // Turn off drawing glColorMask(0, 0, 0, 0); glDepthMask(0); // Draw vertices here ... // Turn everything back on glColorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]); glDepthMask(depthMask); // Only render pixels in areas where the stencil buffer value == ref glStencilFunc(GL_EQUAL, ref, 0xFF); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); } void pushScissor(Rect rect) { // increment things only at the current stencil stack level glStencilFunc(GL_EQUAL, s_scissorStack.size(), 0xFF); glStencilOp(GL_KEEP, GL_INCR, GL_INCR); s_scissorStack.push_back(rect); drawStencil(rect, states, s_ScissorStack.size()); } void popScissor() { // undo what was done in the previous push, // decrement things only at the current stencil stack level glStencilFunc(GL_EQUAL, s_scissorStack.size(), 0xFF); glStencilOp(GL_KEEP, GL_DECR, GL_DECR); Rect rect = s_scissorStack.back(); s_scissorStack.pop_back(); drawStencil(rect, states, s_scissorStack.size()); } And this is how it's being used by the Widgets if (m_clip) pushScissor(m_rect); drawInternal(target, states); for (auto child : m_children) target.draw(*child, states); if (m_clip) popScissor(); This is the result of the above code: There are two things on the screen, a giant test button, and a window with some buttons and text areas on it. The text area scroll box is set to clip its children (so that the text doesn't extend outside the scroll box). The button is drawn after the window and should be on top of it completely. However, for some reason the text area is appearing on top of the button. The only reason I can think of that this would happen is if the stencil values were not getting decremented in the pop, and when it comes time to render the button, since those pixels don't have the right stencil value it doesn't draw over. But I can't figure out whats wrong with my code that would cause that to happen.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >