Search Results

Search found 4932 results on 198 pages for 'paypal buttons'.

Page 10/198 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • MVC 2 Editor Template for Radio Buttons

    - by Steve Michelotti
    A while back I blogged about how to create an HTML Helper to produce a radio button list.  In that post, my HTML helper was “wrapping” the FluentHtml library from MvcContrib to produce the following html output (given an IEnumerable list containing the items “Foo” and “Bar”): 1: <div> 2: <input id="Name_Foo" name="Name" type="radio" value="Foo" /><label for="Name_Foo" id="Name_Foo_Label">Foo</label> 3: <input id="Name_Bar" name="Name" type="radio" value="Bar" /><label for="Name_Bar" id="Name_Bar_Label">Bar</label> 4: </div> With the release of MVC 2, we now have editor templates we can use that rely on metadata to allow us to customize our views appropriately.  For example, for the radio buttons above, we want the “id” attribute to be differentiated and unique and we want the “name” attribute to be the same across radio buttons so the buttons will be grouped together and so model binding will work appropriately. We also want the “for” attribute in the <label> element being set to correctly point to the id of the corresponding radio button.  The default behavior of the RadioButtonFor() method that comes OOTB with MVC produces the same value for the “id” and “name” attributes so this isn’t exactly what I want out the the box if I’m trying to produce the HTML mark up above. If we use an EditorTemplate, the first gotcha that we run into is that, by default, the templates just work on your view model’s property. But in this case, we *also* was the list of items to populate all the radio buttons. It turns out that the EditorFor() methods do give you a way to pass in additional data. There is an overload of the EditorFor() method where the last parameter allows you to pass an anonymous object for “extra” data that you can use in your view – it gets put on the view data dictionary: 1: <%: Html.EditorFor(m => m.Name, "RadioButtonList", new { selectList = new SelectList(new[] { "Foo", "Bar" }) })%> Now we can create a file called RadioButtonList.ascx that looks like this: 1: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> 2: <% 3: var list = this.ViewData["selectList"] as SelectList; 4: %> 5: <div> 6: <% foreach (var item in list) { 7: var radioId = ViewData.TemplateInfo.GetFullHtmlFieldId(item.Value); 8: var checkedAttr = item.Selected ? "checked=\"checked\"" : string.Empty; 9: %> 10: <input type="radio" id="<%: radioId %>" name="<%: ViewData.TemplateInfo.HtmlFieldPrefix %>" value="<%: item.Value %>" <%: checkedAttr %>/> 11: <label for="<%: radioId %>"><%: item.Text %></label> 12: <% } %> 13: </div> There are several things to note about the code above. First, you can see in line #3, it’s getting the SelectList out of the view data dictionary. Then on line #7 it uses the GetFullHtmlFieldId() method from the TemplateInfo class to ensure we get unique IDs. We pass the Value to this method so that it will produce IDs like “Name_Foo” and “Name_Bar” rather than just “Name” which is our property name. However, for the “name” attribute (on line #10) we can just use the normal HtmlFieldPrefix property so that we ensure all radio buttons have the same name which corresponds to the view model’s property name. We also get to leverage the fact the a SelectListItem has a Boolean Selected property so we can set the checkedAttr variable on line #8 and use it on line #10. Finally, it’s trivial to set the correct “for” attribute for the <label> on line #11 since we already produced that value. Because the TemplateInfo class provides all the metadata for our view, we’re able to produce this view that is widely re-usable across our application. In fact, we can create a couple HTML helpers to better encapsulate this call and make it more user friendly: 1: public static MvcHtmlString RadioButtonList<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, params string[] items) 2: { 3: return htmlHelper.RadioButtonList(expression, new SelectList(items)); 4: } 5:   6: public static MvcHtmlString RadioButtonList<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<SelectListItem> items) 7: { 8: var func = expression.Compile(); 9: var result = func(htmlHelper.ViewData.Model); 10: var list = new SelectList(items, "Value", "Text", result); 11: return htmlHelper.EditorFor(expression, "RadioButtonList", new { selectList = list }); 12: } This allows us to simply the call like this: 1: <%: Html.RadioButtonList(m => m.Name, "Foo", "Bar" ) %> In that example, the values for the radio button are hard-coded and being passed in directly. But if you had a view model that contained a property for the collection of items you could call the second overload like this: 1: <%: Html.RadioButtonList(m => m.Name, Model.FooBarList ) %> The Editor templates introduced in MVC 2 definitely allow for much more flexible views/editors than previously available. By knowing about the features you have available to you with the TemplateInfo class, you can take these concepts and customize your editors with extreme flexibility and re-usability.

    Read the article

  • ASP.NET Multi-Select Radio Buttons

    - by Ajarn Mark Caldwell
    “HERESY!” you say, “Radio buttons are for single-select items!  If you want multi-select, use checkboxes!”  Well, I would agree, and that is why I consider this a significant bug that ASP.NET developers need to be aware of.  Here’s the situation. If you use ASP:RadioButton controls on your WebForm, then you know that in order to get them to behave properly, that is, to define a group in which only one of them can be selected by the user, you use the Group attribute and set the same value on each one.  For example: 1: <asp:RadioButton runat="server" ID="rdo1" Group="GroupName" checked="true" /> 2: <asp:RadioButton runat="server" ID="rdo2" Group="GroupName" /> With this configuration, the controls will render to the browser as HTML Input / Type=radio tags and when the user selects one, the browser will automatically deselect the other one so that only one can be selected (checked) at any time. BUT, if you user server-side code to manipulate the Checked attribute of these controls, it is possible to set them both to believe that they are checked. 1: rdo2.Checked = true; // Does NOT change the Checked attribute of rdo1 to be false. As long as you remain in server-side code, the system will believe that both radio buttons are checked (you can verify this in the debugger).  Therefore, if you later have code that looks like this 1: if (rdo1.Checked) 2: { 3: DoSomething1(); 4: } 5: else 6: { 7: DoSomethingElse(); 8: } then it will always evaluate the condition to be true and take the first action.  The good news is that if you return to the client with multiple radio buttons checked, the browser tries to clean that up for you and make only one of them really checked.  It turns out that the last one on the screen wins, so in this case, you will in fact end up with rdo2 as checked, and if you then make a trip to the server to run the code above, it will appear to be working properly.  However, if your page initializes with rdo2 checked and in code you set rdo1 to checked also, then when you go back to the client, rdo2 will remain checked, again because it is the last one and the last one checked “wins”. And this gets even uglier if you ever set these radio buttons to be disabled.  In that case, although the client browser renders the radio buttons as though only one of them is checked the system actually retains the value of both of them as checked, and your next trip to the server will really frustrate you because the browser showed rdo2 as checked, but your DoSomething1() routine keeps getting executed. The following is sample code you can put into any WebForm to test this yourself. 1: <body> 2: <form id="form1" runat="server"> 3: <h1>Radio Button Test</h1> 4: <hr /> 5: <asp:Button runat="server" ID="cmdBlankPostback" Text="Blank Postback" /> 6: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7: <asp:Button runat="server" ID="cmdEnable" Text="Enable All" OnClick="cmdEnable_Click" /> 8: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9: <asp:Button runat="server" ID="cmdDisable" Text="Disable All" OnClick="cmdDisable_Click" /> 10: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11: <asp:Button runat="server" ID="cmdTest" Text="Test" OnClick="cmdTest_Click" /> 12: <br /><br /><br /> 13: <asp:RadioButton ID="rdoG1R1" GroupName="Group1" runat="server" Text="Group 1 Radio 1" Checked="true" /><br /> 14: <asp:RadioButton ID="rdoG1R2" GroupName="Group1" runat="server" Text="Group 1 Radio 2" /><br /> 15: <asp:RadioButton ID="rdoG1R3" GroupName="Group1" runat="server" Text="Group 1 Radio 3" /><br /> 16: <hr /> 17: <asp:RadioButton ID="rdoG2R1" GroupName="Group2" runat="server" Text="Group 2 Radio 1" /><br /> 18: <asp:RadioButton ID="rdoG2R2" GroupName="Group2" runat="server" Text="Group 2 Radio 2" Checked="true" /><br /> 19:  20: </form> 21: </body> 1: protected void Page_Load(object sender, EventArgs e) 2: { 3:  4: } 5:  6: protected void cmdEnable_Click(object sender, EventArgs e) 7: { 8: rdoG1R1.Enabled = true; 9: rdoG1R2.Enabled = true; 10: rdoG1R3.Enabled = true; 11: rdoG2R1.Enabled = true; 12: rdoG2R2.Enabled = true; 13: } 14:  15: protected void cmdDisable_Click(object sender, EventArgs e) 16: { 17: rdoG1R1.Enabled = false; 18: rdoG1R2.Enabled = false; 19: rdoG1R3.Enabled = false; 20: rdoG2R1.Enabled = false; 21: rdoG2R2.Enabled = false; 22: } 23:  24: protected void cmdTest_Click(object sender, EventArgs e) 25: { 26: rdoG1R2.Checked = true; 27: rdoG2R1.Checked = true; 28: } 29: 30: protected void Page_PreRender(object sender, EventArgs e) 31: { 32:  33: } After you copy the markup and page-behind code into the appropriate files.  I recommend you set a breakpoint on Page_Load as well as cmdTest_Click, and add each of the radio button controls to the Watch list so that you can walk through the code and see exactly what is happening.  Use the Blank Postback button to cause a postback to the server so you can inspect things without making any changes. The moral of the story is: if you do server-side manipulation of the Checked status of RadioButton controls, then you need to set ALL of the controls in a group whenever you want to change one.

    Read the article

  • Need help creating flash animation with clickable buttons at the end.

    - by goldenfeelings
    Very inexperienced with Flash, but I hope this is simple enough for someone to walk me through. I'm ultimately trying to create a flash page for an html website that has a brief five-second animation during which 3 buttons fade in (buttons then become clickable after the animation is over). The animation part is done. Right now, I am trying to get my movie to stop and hold on the last frame, where I want to add the 3 buttons that the user can click on to take them to one 3 different html pages of my website. All instructions that I've found online have said to create a new layer for actions, insert a keyframe on the last frame of the movie, and add stop(); in the actionscript window. However, when I have the keyframe selected, my actionscript window says "current selection cannot have actions applied to it". Any ideas? I definitely don't have any objects selected, just the keyframe. Or, am I approaching this totally wrong?

    Read the article

  • ThinkPad TrackPoint Buttons Not Working Well

    - by Oscar Godson
    The TrackPoint itself works fine. But the three buttons below the spacebar don't. For example if I were to copy these lines, 1-10, using trackpoint buttons it'd start highlighting at 7. If I use the main TrackPad (the part every laptop) and it's buttons it works normal, 1-10: 1 2 3 4 5 6 7 8 9 10 It's like the button doesn't register right away. I use the TrackPoint ALL the time. I love it and I don't think I can go back to the normal TrackPad, so is there anyway to fix this? An app or setting? Also, the middle button to scroll isn't working at all I tried: Middle Button on ThinkPad Not Working with 10.10 update And put it in /usr/share/... and /usr/lib... neither seem to work. They USED to work. I used to be able to use that method of fixing it, but it seems in 11.04 this doesnt work? I dont wanna give up on Ubuntu yet...

    Read the article

  • How to manage a lot of Action Listeners for multiple buttons

    - by Wumbo4Dayz
    I have this Tic Tac Toe game and I thought of this really cool way to draw out the grid of 9 little boxes. I was thinking of putting buttons in each of those boxes. How should I give each button (9 buttons in total) an ActionListener that draws either an X or O? Should they each have their own, or should I do some sort of code that detects turns in this? Could I even do a JButton Array and do some for loops to put 9 buttons. So many possibilities, but which one is the most proper? Code so far: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Board extends JPanel implements ActionListener{ public Board(){ Timer timer = new Timer(25,this); timer.start(); } @Override protected void paintComponent(Graphics g){ for(int y = 0; y < 3; y++){ for(int x = 0; x < 3; x++){ g.drawRect(x*64, y*64, 64, 64); } } } public void actionPerformed(ActionEvent e){ repaint(); } }

    Read the article

  • Bump the Bill

    - by David Dorf
    I'm writing this from 3,400 feet in the air somewhere between Chicago and Austin. GoGo In-flight strikes again. Is there anywhere I can't get a WiFi connection? While listening to Deacon Blues by Steely Dan and skimming the news, I just came across an interesting article on mobile payments. Remember when I wrote about the iPhone Bump application and its possible use in retail? Well it looks like PayPal updated their mobile payments application to include the bump technology. Now its possible to transfer money between individuals by bumping iPhones. According to the WSJ, Paypal did 24 million transactions in 2008 and 140 million in 2009 on mobile phones. As the technology gets easier to use, that number is bound to increase. Alternatives to Paypal include Google Checkout, Amazon Payments, wireless carriers ("put it on my phone bill"), smart cards (using your phone's SIM card), and iTunes. That last one comes courtesy of a story Joe Skorupa wrote on mobile payments. It looks like Apple allows iPhone apps to take micro-payments via iTunes accounts, so there may come a time when its possible to use your iPhone to make a purchase in a retail store and have your credit card charged via your iTunes account. There are still some improvements in usability to be made before using a phone will be easier than swiping a credit card, but its already better than fussing with cash.

    Read the article

  • Eclipse behaves strangely on Ubuntu 9.10. My buttons won't work after the upgrade!

    - by Legend
    Everything was fine until I did an upgrade from Ubuntu 9.04 to 9.10. Since then, Eclipse just doesn't respond properly. The following are the symptoms I can see: When I click on update, it grabs the available updates but doesn't show them. Any internal window that is displayed has corrupted buttons I cannot click on any of the buttons. I have to keep pressing Tab to highlight that specific button and then hit spacebar. Anyone knows how to solve this?

    Read the article

  • Paypal adaptive payment API call with C# .NET? Preferably with WebServices

    - by Phil
    Okay I might be entirely off track now but here goes: Our "webshop" offers two functions, buying a specific product and selling it back to us. Back-end handles if the user can sell or not. I've decided to use Paypal's adaptive payments for this one as it seems the way to go doing these kinds of transactions. I've never implemented any kind of shop so I'm totally green with this one. I only recently learned ASP.NET and have mainly developed games before moving to this kind of development. HTTP is still some level of magic to me hehe.. I might be confused but I think paypal offers a webservice with their adaptive payment API. My humble request: A nice soul who wants to share an example of implementing an adaptive payment API call with C# .NET. If they don't offer it as a webservice I'll probably find it as a custom .dll or something. Any tips and examples are highly appreciated! Thanks for reading

    Read the article

  • Can I use PayPal to charge a Credit Card automatically?

    - by Mark
    If I have a Visa card number saved in my database, is there a way I can charge that Visa automatically through the PayPal API without the user having to enter anything? We want to keep this site as easy and hassle-free to use as possible. It would be a variable amount, based on how they use the site. (Don't worry, proper disclaimers will be in place, and the user will be notified) What about these "recurring payments"? That way I don't have to store the CC info on my website, but do they allow variable amounts that I could periodically send to PayPal?

    Read the article

  • Configuring mouse buttons to switch between apps?

    - by Matt Gregory
    I just installed 14.04, so I'm using the default setup (Unity, I guess). I have these two extra mouse buttons on the side of my mouse. Is there any way to map these so they can switch between open apps? What would be perfect is if clicking on button 6 (or whatever it is) would cycle forward through apps, button 7 would go backwards, and holding one of the buttons would show the task list and let you click on the app you want. That's really what I want.

    Read the article

  • Issues with touch buttons in XNA (Release state to be precise)

    - by Aditya
    I am trying to make touch buttons in WP8 with all the states (Pressed, Released, Moved), but the TouchLocationState.Released is not working. Here's my code: Class variables: bool touching = false; int touchID; Button tempButton; Button is a separate class with a method to switch states when touched. The Update method contains the following code: TouchCollection touchCollection = TouchPanel.GetState(); if (!touching && touchCollection.Count > 0) { touching = true; foreach (TouchLocation location in touchCollection) { for (int i = 0; i < menuButtons.Count; i++) { touchID = location.Id; // store the ID of current touch Point touchLocation = new Point((int)location.Position.X, (int)location.Position.Y); // create a point Button button = menuButtons[i]; if (GetMenuEntryHitBounds(button).Contains(touchLocation)) // a method which returns a rectangle. { button.SwitchState(true); // change the button state tempButton = button; // store the pressed button for accessing later } } } } else if (touchCollection.Count == 0) // clears the state of all buttons if no touch is detected { touching = false; for (int i = 0; i < menuButtons.Count; i++) { Button button = menuButtons[i]; button.SwitchState(false); } } menuButtons is a list of buttons on the menu. A separate loop (within the Update method) after the touched variable is true if (touching) { TouchLocation location; TouchLocation prevLocation; if (touchCollection.FindById(touchID, out location)) { if (location.TryGetPreviousLocation(out prevLocation)) { Point point = new Point((int)location.Position.X, (int)location.Position.Y); if (prevLocation.State == TouchLocationState.Pressed && location.State == TouchLocationState.Released) { if (GetMenuEntryHitBounds(tempButton).Contains(point)) // Execute the button action. I removed the excess } } } } The code for switching the button state is working fine but the code where I want to trigger the action is not. location.State == TouchLocationState.Released mostly ends up being false. (Even after I release the touch, it has a value of TouchLocationState.Moved) And what is more irritating is that it sometimes works! I am really confused and stuck for days now. Is this the right way? If yes then where am I going wrong? Or is there some other more effective way to do this? PS: I also posted this question on stack overflow then realized this question is more appropriate in gamedev. Sorry if it counts as being redundant.

    Read the article

  • How are buttons made to be clicked?

    - by Johnny
    I just want to ask a general question. According to that answer, Ill continue thinking. You know in games there are lots of clickable items. Play button, exit, comboboxes maybe etc. My question is are those buttons drawn in same canvas with background and all other things, or for every different thing there is another canvas object? My question is about for general. Im not asking about a specific game, im asking how they are made generally. Im planning to start a game on Android, and Im confused actually how to design buttons, and other object. Probably Im going to use View/SurfaceView for now. I don't have much experience with OpenGL yet. Thanks in advance.

    Read the article

  • set left handed mouse, then wacom stylus buttons switch too

    - by begtognen
    I'm using Lubuntu 12.04. I can set my mouse (basic usb mouse) to left hand (i.e. switch the left and right mouse buttons which is all I need) by going into Preferences / Keyboard and Mouse. However, it changes my Wacom stylus, so that when the tip touches the tablet it acts like the right mouse button, making it impossible to draw. Is there a way to have both happen at once? The stylus buttons working in right handed configuration, while the mouse works in left handed configuration? Thanks for any help/suggestions.

    Read the article

  • how to bind data binding source to group radio buttons

    Hi I am working on windows c# application (visual studio 20008).In my form I have 5 Radio buttons ,grouped by group box. I have to bind this radio button to data binding source. this.rdoptPlus.DataBindings.Add(new Binding("Checked", MemberDefinitionsBindingSource, "UnaryOperator", true)); this.rdoptMinus.DataBindings.Add(new Binding("Checked", MemberDefinitionsBindingSource, "UnaryOperator", true)); i am unable to bind single datacolum to 5 radio buttons,please help me  read moreBy masuri suhasiniDid 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

  • Maximize, minimize and close buttons are either not present or not working in Lubuntu

    - by jimirings
    As the title indicates, the maximize, minimize, and close buttons are either not present or not working on my Lubuntu desktop. In fact, it only seems to be Google Chrome that displays the buttons at all, and only the close button works in Chrome, maximize and minimize don't do anything. When I use regular Ubuntu, they're all there just fine but not on Lubuntu. This all seemed to occur after I hooked my netbook up to an external monitor while using Lubuntu. Not sure if that had anything to do with it or not, but it seemed too big of a coincidence to not mention. Any ideas what the cause and a fix might be? Thanks in advance.

    Read the article

  • Laptop buttons not working on a Dell Latitude e6400

    - by Ido
    I have install Ubuntu 12.10 64 bit on my Dell Latitude E6400 laptop. I have the latest bios version for my laptop (A32) which I downloaded from the official Dell website by checking updates that matches the service tag on my laptop. I'm having serious problems with all the mouse buttons on my laptop. The right-click button doesn't work at all under any circumstance. The left click button only work when clicking on icons in the left side-bar and in the top menu (like clicking on the power icon in the top-right corner or clicking on the file menu). However none of the buttons work in any of the applications even simple one like the file browser (home folder). For example when I try to click on a folder inside nautilus it doesn't work or when I try to click on the "x" close icon to close the window it also doesn't work. Can you help me figure it out?

    Read the article

  • Gnome 3 - Old fashioned buttons and menus

    - by vigs1990
    I've upgraded to Gnome 3 and the problem I'm facing is that when I restart, sometimes the menus and buttons look old-fashioned like this: whereas sometimes, it looks modern and neat like this: Notice the differences between the two: here are a few differences: The menu bar (notice the difference in fonts, dark grey color of Snapshot1 vs the light grey color in Snapshot2 in the background) The file navigation bar bellow the menu bar (notice the 'Home' button there and also the left arrow button) The left-hand side navigation bar (font, background color and color of selected folder) The old style look effects the GTK aspects of the interface, such as the menu, buttons, mouse pointer etc. Another observation is that changing the GTK themes does using gnome-tweak-tool when the old style look is loaded does NOT work. However, this works when the regular look is loaded. How can I ensure that the old-fashioned look does not load on boot?

    Read the article

  • What open source ecommerce webshops offer #1: usability, #2: PayPal integration, and #3: ease of administration and use

    - by Jonathan Hayward
    I've spent several days trying to deploy Satchmo, in the process asking several questions about deployment (http://stackoverflow.com/questions/11277407/can-anyone-explain-this-error-message-deploying-a-satchmo-project-under-gunicorn, http://stackoverflow.com/questions/11277685/is-there-a-howto-to-fcgi-for-deploying-satchmo, and http://stackoverflow.com/questions/11278295/what-is-the-most-stable-release-of-satchmo). Django's tagline is "The web framework for perfectionists with deadlines," and Satchmo's tagline is equally forceful: "The webshop for perfectionists with deadlines." I'm looking more to set up, configure, design, etc., rather than code for this one, and I'm taking a bit of a hint that for me at least the "with deadlines" bit is something that I cannot manage. Deployment has been a time sink. So, taking a step back, I don't specifically need to edit and extend the source code; what I want are first, good usability and a clean experience for the end-user, then being easy to deploy/install/manage/maintain, and enough so that even if you're having a slow day it should at most be one day's work to install, one day's work to get running, and one day's work to rebrand as white label (for simple branding). What ecommerce webshops should I be looking at?

    Read the article

  • Two small issues with Windows Phone 7 ApplicationBar buttons (and workaround)

    - by Laurent Bugnion
    When you work with the ApplicationBar in Windows Phone 7, you notice very fast that it is not quite a component like the others. For example, the ApplicationBarIconButton element is not a dependency object, which causes issues because it is not possible to add attached properties to it. Here are two other issues I stumbled upon, and what workaround I used to make it work anyway. Finding a button by name returns null Since the ApplicationBar is not in the tree of the Silverlight page, finding an element by name fails. For example consider the following code: <phoneNavigation:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar> <shell:ApplicationBar.Buttons> <shell:ApplicationBarIconButton IconUri="/Resources/edit.png" Click="EditButtonClick" x:Name="EditButton"/> <shell:ApplicationBarIconButton IconUri="/Resources/cancel.png" Click="CancelButtonClick" x:Name="CancelButton"/> </shell:ApplicationBar.Buttons> </shell:ApplicationBar> </phoneNavigation:PhoneApplicationPage.ApplicationBar> with private void EditButtonClick( object sender, EventArgs e) { CancelButton.IsEnabled = false; // Fails, CancelButton is always null } The CancelButton, even though it is named through an x:Name attribute, and even though it appears in Intellisense in the code behind, is null when it is needed. To solve the issue, I use the following code: public enum IconButton { Edit = 0, Cancel = 1 } public ApplicationBarIconButton GetButton( IconButton which) { return ApplicationBar.Buttons[(int) which] as ApplicationBarIconButton; } private void EditButtonClick( object sender, EventArgs e) { GetButton(IconButton.Cancel).IsEnabled = false; } Updating a Binding when the icon button is clicked In Silverlight, a Binding on a TextBox’s Text property can only be updated in two circumstances: When the TextBox loses the focus. Explicitly by placing a call in code. In WPF, there is a third option, updating the Binding every time that the Text property changes (i.e. every time that the user types a character). Unfortunately this option is not available in Silverlight). To select option 1, 2 (and in WPF, 3), you use the Mode property of the Binding class. The issue here is that pressing a button on the ApplicationBar does not remove the focus from the TextBox where the user is currently typing. If the button is a Save button, this is super annoying: The Binding does not get updated on the data object, the object is saved anyway with the old state, and noone understands what just happened. In order to solve this, you can make sure that the Binding is updated explicitly when the button is pressed, with the following code: private void SaveButtonClick(object sender, EventArgs e) { // Force update binding first var binding = MessageTextBox.GetBindingExpression( TextBox.TextProperty); binding.UpdateSource(); // Property was updated for sure, now we can save var vm = DataContext as MainViewModel; vm.Save(); } Obviously this is less maintainable than the usual way to do things in Silverlight. So be careful when using the ApplicationBar and remember that it is not a Silverlight element like the others!! Happy coding! Laurent   Laurent Bugnion (GalaSoft) Subscribe | Twitter | Facebook | Flickr | LinkedIn

    Read the article

  • is a merchant account a requirment for a website to take payments..

    - by calum
    Hi, I have had a quick look but couldn't see anything related. Basically, if we were to accept payments for events on our website, via paypal (essentially a Buy it now! button), as a business, do we need a merchant's account, or will a regular bank account be acceptable? I may have some confusion in terms. My understanding is you need a merchant's account to accept credit card payments, but as we are using PayPal, is this necessary? Thank you for any clarification. disclaimer - I've read What are some options for taking payments on my website? but it doesn't explicitly say if we require a merchant account or not. Thank you.

    Read the article

  • is a merchant account a requirment for a website to take payments

    - by calum
    I have had a quick look but couldn't see anything related. Basically, if we were to accept payments for events on our website, via paypal (essentially a Buy it now! button), as a business, do we need a merchant's account, or will a regular bank account be acceptable? I may have some confusion in terms. My understanding is you need a merchant's account to accept credit card payments, but as we are using PayPal, is this necessary? Thank you for any clarification. disclaimer - I've read What are some options for taking payments on my website? but it doesn't explicitly say if we require a merchant account or not. Thank you.

    Read the article

  • Only close button shows up in Google Chrome in GNOME Shell

    - by TreefrogInc
    After I installed the GNOME shell in Ubuntu, I decided that I didn't like having the "Close/Minimize/Maximize" buttons on the right, so I switched them over to the left using gconftool-2 --set "/apps/metacity/general/button_layout" --type string "close, minimize, maximize:" After resetting the shell, however, I found that with the GTK+ theme, only the close button shows up. Using system title bar and borders will make all the buttons appear, but I really want to use the theme because the system title bar makes the top bar too thick. Logging out and back in didn't fix it, and I tried reinstalling Chrome, but the problem persists.

    Read the article

  • handling the holding of money on a platform

    - by user1716672
    We are building a platform for a client, developed in Yii, where users can top up their account on the platform with money from paypal. Users can upload files and buy access to each others files. User can also gift other users with money. I was thinking that when users top up their account, the money goes rom their Paypal to the merchant account of the website. So all users' money goes to one merchant account. Then, any transactions on the platform are simply recorded on the platform and each users' balance is the maximum amount they can withdraw from the merchant account. Is this the right approach? Legally, are there any problems?

    Read the article

  • Customer escalated to a claim without sending the item back? [closed]

    - by kavoir.com
    She claims that she has sent the item back but for over 1 month I haven't received it. I don't know where I can find the tracking number so I don't know if she really sent it or not. Now she has escalated the dispute to claim and PayPal is asking me for information. The reason is "Not as described". So how do I respond to this? I mean, in the dispute, we agreed that I'll issue a full refund as soon as I receive the package she return to us but we never received this package that she claimed to have sent back. Now she's escalating this to a claim and PayPal is asking me for documents. How can I provide any documents that would prove she hasn't sent the package? Thanks!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >