Search Results

Search found 11261 results on 451 pages for 'mr foo bar'.

Page 8/451 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Tab Bar disappears below the bottom of the screen

    - by Manu
    Hi, In my application I'm using a Navigation Controller to push one view that loads a Tab Bar Controller and a custom Navigation Bar as well. The problem is that the Tab Bar disappears below the bottom of the screen, and I don't know what's causing the problem. If I load a simple Tab Bar in the next view, it positions itself correctly... but what I need is a Tab Bar Controller, and in that case the Tab Bar disappears below the bottom. I have tried changing the view and size properties of the Tab Bar, but that did not solve the problem. I also realised that the images and text of the tabs don't show (I have set up the "favourites" and "contacts" images and text, and they are big enough and should be visible on the top side of the tab, but they are not). Both tabs work perfectly, by the way. There is an image here. I load the Tab Bar with the following code: - (void)viewDidLoad { [super viewDidLoad]; myTabBarController = [[UITabBarController alloc] init]; SettingsViewController* tab1 = [[SettingsViewController alloc] init]; AboutViewController* tab2 = [[AboutViewController alloc] init]; NSArray* controllers = [NSArray arrayWithObjects:tab1, tab2, nil]; myTabBarController.viewControllers = controllers; [self.view insertSubview:myTabBarController.view belowSubview:myNavigationBar]; } It doesn't matter if I remove the Navigation Bar or not. I have tested using this instead: [self.view addSubview:myTabBarController.view]; ... forgetting about the Navigation Bar, but the Tab Bar still goes under the bottom. I don't know if the problem is in one of my NIB files or in how I load the view (although I do this as I read in the Apple's SDK documentation). Any ideas? Another question would be... do you know how could I change the title of my Navigation Bar when I select the second tab? I imagine I would have to do it in viewDidLoad in AboutViewController.m, would that be correct? Thanks for you time!

    Read the article

  • Deleted array value still showing up on foreach loop in AS3 (bug in flash?)

    - by nexus
    It took me many hours to narrow down a problem in some code to this reproducible error, which seems to me like a bug in AVM2. Can anyone shed light on why this is occurring or how to fix it? When the value at index 1 is deleted and a value is subsequently set at index 0, the non-existent (undefined) value at index 1 will now show up in a foreach loop. I have only been able to produce this outcome with index 1 and 0 (not any other n and n-1). Run this code: package { import flash.display.Sprite; public class Main extends Sprite { public function Main():void { var bar : Array = new Array(6); out(bar); //proper behavior trace("bar[1] = 1", bar[1] = 1); out(bar); //proper behavior trace("delete bar[1]", delete bar[1]); out(bar); //proper behavior trace("bar[4] = 4", bar[4] = 4); out(bar); //for each loop will now iterate over the undefined position at index 1 trace("bar[0] = 0", bar[0] = 0); out(bar); trace("bar[3] = 3", bar[3] = 3); out(bar); } private function out(bar:Array):void { trace(bar); for each(var i : * in bar) { trace(i); } } } } It will give this output: ,,,,, bar[1] = 1 1 ,1,,,, 1 delete bar[1] true ,,,,, bar[4] = 4 4 ,,,,4, 4 bar[0] = 0 0 0,,,,4, 0 undefined 4 bar[3] = 3 3 0,,,3,4, 0 undefined 4 3

    Read the article

  • Created .htaccess file in /var/www to redirect to folder /var/www/foo

    - by Serg
    Context: How can I configure a NameCheap domain to point to an Apache subfolder? Following Devin's answer here I've created a .htaccess file in /var/www and wrote in the following: RewriteEngine On RewriteCond !sergiotapia.me RewriteRule (.*) sergiotapia.me/$1 [QSA] My folder structure is such: /var/www/ /var/www/sergiotapia.me When visiting the URL sergiotapia.me I see the contents of /var/www when I would like to be directly redirected to /var/www/sergiotapia.me Any ideas?

    Read the article

  • how to build flex stack bar chart from objects array?

    - by AngelHeart
    I have a dynamic ArrayCollection that will contain a unknown number of objects of type MyObj: class MyObj { type:String value:long } where each MyObj object has a different value of "type". how can I build a single stacked bar from this array where each section of the stacked bar represents an object of MyObj (represents a "type") and its length is the value?

    Read the article

  • Lambda Functions in PHP aren't Logical

    - by Chacha102
    Note: I have condensed this article into my person wiki: http://wiki.chacha102.com/Lambda - Enjoy I am having some troubles with Lambda style functions in PHP. First, This Works: $foo = function(){ echo "bar"; }; $foo(); Second, This Works: class Bar{ public function foo(){ echo "Bar"; } Third, This works: $foo = new stdClass; $foo->bar = function(){ echo "bar"; }; $test = $foo->bar; $test(); But, this does not work: $foo = new stdClass; $foo->bar = function(){ echo "bar"; }; $foo->bar(); And, this does not work class Bar{ public function foo(){ echo "Bar"; } $foo = new Bar; $foo->foo = function(){ echo "foo"; }; $foo->foo(); // echo's bar instead of Foo. My Question is Why?, and how can I assure that both this: $foo->bar = function(){ echo "test"; }; $foo->bar(); and this $foo = new Bar; $foo->bar(); are called properly? Extra Points if you can point to documentation stating why this problem occurs.

    Read the article

  • Prevent chrome from auto-hiding bookmark bar on google search

    - by Jeromy Anglim
    I am using Chrome 28.0.1500.20 beta on OSX 10.7. In this version, when you perform a google search using the address bar the bookmarks bar disappears. Toggling "always show bookmarks bar" does not restore the bookmark (see screenshot below). I want to always show the bookmark bar. In particular, I often use a bookmarklet that converts a current google search into a Google Scholar search. Is there a way to always show the bookmark bar even when performing a Google search in Chrome?

    Read the article

  • How do I configure the Google Chrome / Chromium address bar to perform a search instead of trying to access a file on the local file system?

    - by Daniel Kauffman
    How do I configure the Google Chrome / Chromium address bar to perform a search instead of trying to access a file on the local file system? I would like to be able to enter a file name in the address bar and to see Google search results for that file name similar to what I would see if I searched for the file name using something like https://www.google.com/#q=/path/to/interesting/file I am able to disable the file scheme using either of the following policy settings: "DisabledSchemes": ["file"], Which has been deprecated in favor of: "URLBlacklist": ["file://"], But in either case Google Chrome / Chromium continues to auto-detect that a file name was entered, automatically prepends the file scheme to the file name, and then reports that the webpage is blocked.

    Read the article

  • Name disappeared from main menu bar

    - by Anthony Burman
    I have Ubuntu 10.4. I installed a nvidia gigabyte geforce 210 graphic card because the intel graphic card is a disaster. I use a terminal and basic, fiddly adjustments were successfully made to get the window to fit the screen. The new card is a roaring success. Nothing freezes and visuals can be set to Extra. But, from that point on, my main menu bar misbehaved and icons kept disappearing. Logon and logoff usually helped. R-E-I-S-U-B was needed when the actual logoff icon disappeared. My full name, Anthony Burman, appeared in the main menu bar. It was alonside Wanda, the Fish , the Oracle.... My name disappeared and I cannot get it back. It can't be found anywhere in the 'add to panel' section. Indicator applet session also can't bring it back. How do i re-insert my name on the toolbar? Thanks, Ant.

    Read the article

  • [Windows 8] An application bar toggle button

    - by Benjamin Roux
    To stay in the application bar stuff, here’s another useful control which enable to create an application bar button that can be toggled between two different contents/styles/commands (used to create a favorite/unfavorite or a play/pause button for example). namespace Indeed.Controls { public class AppBarToggleButton : Button { public bool IsChecked { get { return (bool)GetValue(IsCheckedProperty); } set { SetValue(IsCheckedProperty, value); } } public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register("IsChecked", typeof(bool), typeof(AppBarToggleButton), new PropertyMetadata(false, (o, e) => (o as AppBarToggleButton).IsCheckedChanged())); public string CheckedContent { get { return (string)GetValue(CheckedContentProperty); } set { SetValue(CheckedContentProperty, value); } } public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register("CheckedContent", typeof(string), typeof(AppBarToggleButton), null); public ICommand CheckedCommand { get { return (ICommand)GetValue(CheckedCommandProperty); } set { SetValue(CheckedCommandProperty, value); } } public static readonly DependencyProperty CheckedCommandProperty = DependencyProperty.Register("CheckedCommand", typeof(ICommand), typeof(AppBarToggleButton), null); public Style CheckedStyle { get { return (Style)GetValue(CheckedStyleProperty); } set { SetValue(CheckedStyleProperty, value); } } public static readonly DependencyProperty CheckedStyleProperty = DependencyProperty.Register("CheckedStyle", typeof(Style), typeof(AppBarToggleButton), null); public bool AutoToggle { get { return (bool)GetValue(AutoToggleProperty); } set { SetValue(AutoToggleProperty, value); } } public static readonly DependencyProperty AutoToggleProperty = DependencyProperty.Register("AutoToggle", typeof(bool), typeof(AppBarToggleButton), null); private object content; private ICommand command; private Style style; private void IsCheckedChanged() { if (IsChecked) { // backup the current content and command content = Content; command = Command; style = Style; if (CheckedStyle == null) Content = CheckedContent; else Style = CheckedStyle; Command = CheckedCommand; } else { if (CheckedStyle == null) Content = content; else Style = style; Command = command; } } protected override void OnTapped(Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { base.OnTapped(e); if (AutoToggle) IsChecked = !IsChecked; } } } .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; } To use it, it’s very simple. <ic:AppBarToggleButton Style="{StaticResource PlayAppBarButtonStyle}" CheckedStyle="{StaticResource PauseAppBarButtonStyle}" Command="{Binding Path=PlayCommand}" CheckedCommand="{Binding Path=PauseCommand}" IsChecked="{Binding Path=IsPlaying}" /> .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; } When the IsPlaying property (in my ViewModel) is true the button becomes a Pause button, when it’s false it becomes a Play button. Warning: Just make sure that the IsChecked property is set in last in your control !! If you don’t use style you can alternatively use Content and CheckedContent. Furthermore you can set the AutoToggle to true if you don’t want to control is IsChecked property through binding. With this control and the AppBarPopupButton, you can now create awesome application bar for your apps ! Stay tuned for more awesome Windows 8 tricks !

    Read the article

  • How to emulate "-lib foo.jar" from _within_ build.xml

    - by Thorbjørn Ravn Andersen
    By specifying "-lib foo.jar" to ant I get the behaviour that the classes in foo.jar is added to the ant classloader and are available for various tasks taking a class name argument. I'd like to be able to specify the same behaviour but only from inside build.xml (so we can do this on a vanilla ant). For taskdefs we have functioning code looking like: <taskdef resource="net/sf/antcontrib/antlib.xml" description="for/foreach tasks"> <classpath> <pathelement location="${active.workspace}/ant-contrib-1.X/lib/ant-contrib.jar" /> </classpath> </taskdef> where the definition is completely provided from the ant-contrib.jar listed. What is the equivalent mechanism for the "global" ant classpath? (I have thought out that this is the way to get <javac> use ecj-3.5.jar to compile with on a JRE - http://stackoverflow.com/questions/2364006/specifying-the-eclipse-compiler-completely-from-within-build-xml - in a way compatible with ant 1.7. Better suggestions are welcome :) EDIT: It appears that the about-to-be-released version 1.0 of ant4eclipse includes ecj. This does not answer the question, but may solve my basic problem.

    Read the article

  • Mocking property sets

    - by mehfuzh
    In this post, i will be showing how you can mock property sets with your expected values or even action using JustMock. To begin, we have a sample interface: public interface IFoo {     int Value { get; set; } } Now,  we can create a mock that will throw on any call other than the one expected, generally its a strict mock and we can do it like: bool expected = false;  var foo = Mock.Create<IFoo>(BehaviorMode.Strict);  Mock.ArrangeSet(() => { foo.Value = 1; }).DoInstead(() => expected  = true);    foo.Value = 1;    Assert.True(expected); Here , the method for running though our expectation for set is Mock.ArrangeSet , where we can directly set our expectations or can even set matchers into it like: var foo = Mock.Create<IFoo>(BehaviorMode.Strict);   Mock.ArrangeSet(() => foo.Value = Arg.Matches<int>(x => x > 3));   foo.Value = 4; foo.Value = 5;   Assert.Throws<MockException>(() => foo.Value = 3);   In the example, any set for value not satisfying matcher expression will throw an MockException as this is a strict mock but what will be the case for loose mocks, where we also have to assert it. Here, let’s take an interface with an indexed property. Indexers are treated in the same way as properties, as with basic indexers let you access your class if it were an array. public interface IFooIndexed {     string this[int key] { get; set; } } We want to  setup a value for a particular index,  we then will pass that mock to some implementer where it will be actually called. Once done, we want to assert that if it has been invoked properly. var foo = Mock.Create<IFooIndexed>();   Mock.ArrangeSet(() => foo[0] = "ping");   foo[0] = "ping";   Mock.AssertSet(() => foo[0] = "ping"); In the above example, both the values are user defined, it might happen that we want to make it more dynamic, In this example, i set it up for set with any value and finally checked if it is set with the one i am looking for. var foo = Mock.Create<IFooIndexed>();   Mock.ArrangeSet(() => foo[0] = Arg.Any<string>());   foo[0] = "ping";   Mock.AssertSet(() => foo[0] = Arg.Matches<string>(x => string.Compare("ping", x) == 0)); This is more or less of mocking user sets , but we can further have it to throw exception or even do our own task for a particular set , like : Mock.ArrangeSet(() => foo.MyProperty = 10).Throws(new ArgumentException()); Or  bool expected = false;  var foo = Mock.Create<IFoo>(BehaviorMode.Strict);  Mock.ArrangeSet(() => { foo.Value = 1; }).DoInstead(() => expected  = true);    foo.Value = 1;    Assert.True(expected); Or call the original setter , in this example it will throw an NotImplementedExpectation var foo = Mock.Create<FooAbstract>(BehaviorMode.Strict); Mock.ArrangeSet(() => { foo.Value = 1; }).CallOriginal(); Assert.Throws<NotImplementedException>(() => { foo.Value = 1; });   Finally, try all these, find issues, post them to forum and make it work for you :-). Hope that helps,

    Read the article

  • Behavior of local variables in JavaScripts with()-statement

    - by thr
    I noticed some weird (and to my knowledge undefined behavior, by the ECMA 3.0 Spec at least), take the following snippet: var foo = { bar: "1", baz: "2" }; alert(bar); with(foo) { alert(bar); alert(bar); } alert(bar); It crashes in both Firefox and Chrome, because "bar" doesn't exist in the first alert(); statement, this is as expected. But if you add a declaration of bar inside the with()-statement, so it looks like this: var foo = { bar: "1", baz: "2" }; alert(bar); with(foo) { alert(bar); var bar = "g2"; alert(bar); } alert(bar); It will produce the following: undefined, 1, g2, undefined It seems as if you create a variable inside a with()-statement most browsers (tested on Chrome or Firefox) will make that variable exist outside that scope also, it's just set to undefined. Now from my perspective bar should only exist inside the with()-statement, and if you make the example even weirder: var foo = { bar: "1", baz: "2" }; var zoo; alert(bar); with(foo) { alert(bar); var bar = "g2"; zoo = function() { return bar; } alert(bar); } alert(bar); alert(zoo()); It will produce this: undefined, 1, g2, undefined, g2 So the bar inside the with()-statement does not exist outside of it, yet the runtime somehow "automagically" creates a variable named bar that is undefined in its top level scope (global or function) but this variable does not refer to the same one as inside the with()-statement, and that variable will only exist if a with()-statement has a variable named bar that is defined inside it. Very weird, and inconsistent. Anyone have an explanation for this behavior? There is nothing in the ECMA Spec about this.

    Read the article

  • How to assign foo.example.com to one IP address and example.com to a different one?

    - by Guillaume Pierre
    Say that I have a domain name called example.com and two server located at 2 different IP addresses: 1.2.3.4 and 6.7.8.9. How could I assign example.com to 1.2.3.4 and the subdomain foo.example.com to 6.7.8.9? [EDIT] I did try to put a A record linking from @ to the first IP address and from foo.example.com to the second IP address, as illustrated below: And I did configure a vhosts called foo.example.com on my server at IP address 2. The @ record works. But after 3 hours waiting for the result (DNS delay), nothing happened with foo.example.com, which link to nothing. Why?

    Read the article

  • Partial Rendering with Update Progress Bar Using AJAX and jQuery

    This article guides about showing an update progress bar while partial page rendering. It also covers about writing data in XML file as well....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

  • Sendmail SMART_HOST not working

    - by daniel
    Hello, I've defined SMART_HOST to be a specific server, lets call it foo.bar.com. However, when I send a test mail using 'sendmail -t', sendmail tries to use mx.bar.com, which subsequently rejects my mail. I've verified that foo.bar.com works and that mx.bar.com does not work (yay telnet). I've recompiled sendmail.mc vi make, make -C and m4. I've verified the DS entry in sendmail.cf. I've restarted sendmail correctly. I'm not sure how to proceed at this point. Any ideas? Here is my SMART_HOST line: define(SMART_HOST',foo.bar.com')dnl ...and here is the result of a test mail. It never tries to use foo.bar.com, instead it uses mx.bar.com. $ echo subject: test; echo | sendmail -Am -v -flocaluser -- [email protected] subject: test [email protected]... Connecting to mx.bar.com via relay... 220 mx.bar.com ESMTP >>> EHLO myhost.bar.com 250-mx.bar.com 250-8BITMIME 250 SIZE 52428800 >>> MAIL From:<localuser@myhost.bar.com> SIZE=1 250 sender <localuser@myhost.bar.com> ok >>> RCPT To:<[email protected]> 550 #5.1.0 Address rejected. >>> RSET 250 reset localuser... Connecting to local... localuser... Sent Closing connection to mx.bar.com. >>> QUIT 221 mx.bar.com And last, here is a test mail sent using foo.bar.com: $ hostname myhost.bar.com $ telnet foo.bar.com 25 Trying ***.***.***.***... Connected to foo.bar.com (***.***.***.***). Escape character is '^]'. 220 foo.bar.com ESMTP Sendmail 8.14.1/8.14.1/ITS-7.0/ldap2-1+tls; Tue, 21 Dec 2010 13:27:44 -0700 (MST) helo foo 250 foo.bar.com Hello myhost.bar.com [***.***.***.***], pleased to meet you mail from: localuser@myhost.bar.com 250 2.1.0 localuser@myhost.bar.com... Sender ok rcpt to: [email protected] 250 2.1.5 [email protected]... Recipient ok data 354 Enter mail, end with "." on a line by itself testing . 250 2.0.0 oBLKRikZ003758 Message accepted for delivery quit 221 2.0.0 foo.bar.com closing connection Connection closed by foreign host. Any ideas? Thanks

    Read the article

  • BAR - Backup archiver program

    <b>Ubuntu Geek:</b> "BAR is backup archiver program to create compressed and encrypted archives of files that can be stored on a hard disk, CD, DVD, or directly on a server via FTP, SCP, or SFTP. A server mode and a scheduler are integrated for making automated backups in the background. A graphical front end that can connect to the (remote) server is included."

    Read the article

  • Ubuntu 12.04 - Tiny title bar and icon fonts

    - by Dean Mokhtar
    As you can see in the screenshot, the fonts for the title bar (any window) and for the icons within the file browser (as well as in the navigation pane to the left) are very very small, I have tried to fix this by a number of ways including using MyUnity, but to no avail. Could someone please help me with this as it can render my PC unnavigatable unless I'm sitting right up against it, and even then I struggle. I am using Ubuntu 12.04. Screenshot

    Read the article

  • Attaching a Command to the WP7 Application Bar.

    - by mbcrump
    One of the biggest problems that I’ve seen with people creating WP7 applications is how do you bind the application bar to a Relay Command. If your using MVVM then this is particular important. Let’s examine the code that one might add to start with.  <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/icons/appbar.questionmark.rest.png" Text="About"> <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <GalaSoft_MvvmLight_Command:EventToCommand Command="{Binding DisplayAbout, Mode=OneWay}" /> </i:EventTrigger> </i:Interaction.Triggers> </shell:ApplicationBarIconButton> <shell:ApplicationBar.MenuItems> <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"></shell:ApplicationBarMenuItem> <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"></shell:ApplicationBarMenuItem> </shell:ApplicationBar.MenuItems> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar> Everything looks right. But we quickly notice that we have a squiggly line under our Interaction.Triggers. The problem is that the object is not a FrameworkObject. This same code would have worked perfect if this were a normal button. OK. Point has been proved. Let’s make the ApplicationBar support Commands. So, go ahead and create a new project using MVVM Light. If you want to check out the source and work along side this tutorial then click here.  7 Easy Steps to have binding on the Application Bar using MVVM Light (I might add that you don’t have to use MVVM Light to get this functionality, I just prefer it.) 1) Download MVVM Light if you don’t already have it and install the project templates. It is available at http://mvvmlight.codeplex.com/. 2) Click File-New Project and navigate to Silverlight for Windows Phone. Make sure you use the MVVM Light (WP7) Template. 3) Now that we have our project setup and ready to go let’s download a wrapper created by Nicolas Humann here, it is called Phone7.Fx. After you download it then extract it somewhere that you can find it. This wrapper will make our application bar/menu item bindable. 4) Right click References inside your WP7 project and add the .dll file to your project. 5) In your MainPage.xaml you will need to add the proper namespace to it. Don’t forget to build your project afterwards. xmlns:Preview="clr-namespace:Phone7.Fx.Preview;assembly=Phone7.Fx.Preview" 6) Now you can add the BindableAppBar to your MainPage.xaml with a few lines of code.  <Preview:BindableApplicationBar x:Name="AppBar" BarOpacity="1.0" > <Preview:BindableApplicationBarIconButton Command="{Binding DisplayAbout}" IconUri="/icons/appbar.questionmark.rest.png" Text="About" /> <Preview:BindableApplicationBar.MenuItems> <Preview:BindableApplicationBarMenuItem Text="Settings" Command="{Binding InputBox}" /> </Preview:BindableApplicationBar.MenuItems> </Preview:BindableApplicationBar> So your final MainPage.xaml will look similar to this: NOTE: The AppBar will be located inside of the Grid using this wrapper.   <!--LayoutRoot contains the root grid where all other page content is placed--> <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <!--TitlePanel contains the name of the application and page title--> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12"> <TextBlock x:Name="ApplicationTitle" Text="{Binding ApplicationTitle}" Style="{StaticResource PhoneTextNormalStyle}" /> <TextBlock x:Name="PageTitle" Text="{Binding PageName}" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}" /> </StackPanel> <!--ContentPanel - place additional content here--> <Grid x:Name="ContentGrid" Grid.Row="1"> <TextBlock Text="{Binding Welcome}" Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="40" /> </Grid> <Preview:BindableApplicationBar x:Name="AppBar" BarOpacity="1.0" > <Preview:BindableApplicationBarIconButton Command="{Binding DisplayAbout}" IconUri="/icons/appbar.questionmark.rest.png" Text="About" /> <Preview:BindableApplicationBar.MenuItems> <Preview:BindableApplicationBarMenuItem Text="Settings" Command="{Binding InputBox}" /> </Preview:BindableApplicationBar.MenuItems> </Preview:BindableApplicationBar> </Grid> 7) Let’s go ahead and create the RelayCommands and write them up to a MessageBox by editing our MainViewModel.cs file. public class MainViewModel : ViewModelBase { public string ApplicationTitle { get { return "MVVM LIGHT"; } } public string PageName { get { return "My page:"; } } public string Welcome { get { return "Welcome to MVVM Light"; } } public RelayCommand DisplayAbout { get; private set; } public RelayCommand InputBox { get; private set; } /// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel() { if (IsInDesignMode) { // Code runs in Blend --> create design time data. } else { DisplayAbout = new RelayCommand(() => { MessageBox.Show("About box called!"); }); InputBox = new RelayCommand(() => { MessageBox.Show("settings button called"); }); } } If you run the project now you should get something similar to this (notice the AppBar at the bottom):  Now if you hit the question mark then you will get the following MessageBox: The MenuItem works as well so for Settings: As you can see, its pretty easy to add a Command to the ApplicationBar/MenuItem. If you want to look through the full source code then click here.   Subscribe to my feed

    Read the article

  • Put a link on the nav bar in Wordpress

    - by Rafe Kettler
    I have a Wordpress blog. On the same domain, I have some other stuff hosted that isn't part of my WP install. I want to link to those other places on my domain from the top menu bar (nav bar) on my blog. How can I do that? The theme is Lightword, relevant header.php code follows: <body <?php body_class(); ?>> <div id="wrapper"> <?php lightword_header_image(); ?> <div id="header"> <?php lightword_rss_feed(); ?> <div id="top_bar"> <div class="center_menu"> <ul id="front_menu" <?php global $lw_remove_searchbox, $lw_use_wp_menus; $lw_menu_width = ""; if($lw_remove_searchbox == "true") $lw_menu_width = " class=\"expand\" "; echo $lw_menu_width; ?>> <?php echo lightword_homebtn(__('Home','lightword')); ?> <?php if ( function_exists('wp_nav_menu') && $lw_use_wp_menus != "true") { $lightword_menu = wp_nav_menu( array( 'menu' => 'lightword_top_menu', 'echo' => false, 'menu_id' => 'front_menu', 'container' => '', 'theme_location' => 'lightword_top_menu', 'link_before' => '<span>', 'link_after' => '</span>' ) ); $lightword_menu = preg_replace( array( '/^<ul id="front_menu" class="menu">/', '/\n<\/ul>$/' ), '', $lightword_menu); echo $lightword_menu; }else{ echo lightword_wp_list_pages(); } ?> </ul> </div> <?php echo lightword_searchbox(); ?> </div> </div> <div id="content">

    Read the article

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