I assume you lot convey followed me amongst this postal service here:
https://hlthnworkout.blogspot.com//search?q=how-do-i-configure-button-in-xaml
After reading the inwards a higher house you lot volition encounter that you lot start amongst an empty projection whose code is shown here:
WinPhoneStep1
In the lastly measuring you lot volition convey achieved this:
WinPhoneStep11
This projection when deployed volition only present a push every bit inwards the inwards a higher house in addition to naught more:
WinPhoneStep13
Let us offset hand a cite for this button, similar ClickMe. When you lot highlight the push inwards the pattern yesteryear clicking it, the Property pane opens where you lot tin ship away write the cite you lot desire every bit shown.
winPhoneStep20
In the XAML code the Button gets a qualifier x:Name="ClickMe" every bit shown here:
Now come inwards the Click effect to the code yesteryear only come inwards "cl" afterward a infinite every bit shown in addition to the intellisense kicks-in showing your options every bit shown.
winPhoneStep22.png
You pick Click in addition to you lot volition encounter the following:
winPhoneStep23.png
Inside of double quotes type inwards ClickMe_Click (i.e., the cite of the event).
Make a correct click on 'Click' every bit shown inwards the adjacent ikon in addition to you lot volition encounter a pop-up every bit shown.
winPhoneStep24
At the spill out click on View Code (or F7) in addition to you lot volition become the code page inwards C# (MainPage.XAML.cs) every bit shown.
-----------
namespace HelloWorld
{
///
/// An empty page that tin ship away live used on its ain or navigated to inside a Frame.
///
world sealed partial flat MainPage : Page
{
world MainPage()
{
this.InitializeComponent();
}
private void ClickMe_Click(object sender, RoutedEventArgs e)
{
}
}
}
---------------
This yesteryear itself laid the scene for you lot to write the code.
Now you lot convey to create upwardly one's hear what it is you lot desire to produce when the push is clicked.
Let us tell you lot desire the font size of 'Hello' to growth in addition to hence that afterward clicking the size, tell double from 25 to 50.
Then you lot convey to alter the button's font-size holding (initially 25 inwards design) every bit shown. You should travel out the residue every bit is.
---------
private void ClickMe_Click(object sender, RoutedEventArgs e)
{
ClickMe.FontSize = 50;
}
---------------------
Now if you lot BUILD the projection in addition to run every bit described inwards the before postal service you lot would encounter the following:
winPhoneStep25
Now you lot tin ship away click the Run push (Green arrow-head) amongst the next setting:
winPhoneStep26
After around processing your application displays amongst the start upwardly page the following:
winPhoneStep27
After the start this is the offset page.
winPhoneStep28
in addition to when you lot click the push changes to this:
winPhoneStep29
That is all in that place is to it!
https://hlthnworkout.blogspot.com//search?q=how-do-i-configure-button-in-xaml
After reading the inwards a higher house you lot volition encounter that you lot start amongst an empty projection whose code is shown here:
WinPhoneStep1
In the lastly measuring you lot volition convey achieved this:
WinPhoneStep11
This projection when deployed volition only present a push every bit inwards the inwards a higher house in addition to naught more:
WinPhoneStep13
Writing code for a click effect of this button.
Let us offset hand a cite for this button, similar ClickMe. When you lot highlight the push inwards the pattern yesteryear clicking it, the Property pane opens where you lot tin ship away write the cite you lot desire every bit shown.
winPhoneStep20
In the XAML code the Button gets a qualifier x:Name="ClickMe" every bit shown here:
Now come inwards the Click effect to the code yesteryear only come inwards "cl" afterward a infinite every bit shown in addition to the intellisense kicks-in showing your options every bit shown.
winPhoneStep22.png
You pick Click in addition to you lot volition encounter the following:
winPhoneStep23.png
Inside of double quotes type inwards ClickMe_Click (i.e., the cite of the event).
Where produce you lot write code ?
winPhoneStep24
At the spill out click on View Code (or F7) in addition to you lot volition become the code page inwards C# (MainPage.XAML.cs) every bit shown.
-----------
namespace HelloWorld
{
///
/// An empty page that tin ship away live used on its ain or navigated to inside a Frame.
///
world sealed partial flat MainPage : Page
{
world MainPage()
{
this.InitializeComponent();
}
private void ClickMe_Click(object sender, RoutedEventArgs e)
{
}
}
}
---------------
This yesteryear itself laid the scene for you lot to write the code.
Now you lot convey to create upwardly one's hear what it is you lot desire to produce when the push is clicked.
Let us tell you lot desire the font size of 'Hello' to growth in addition to hence that afterward clicking the size, tell double from 25 to 50.
Then you lot convey to alter the button's font-size holding (initially 25 inwards design) every bit shown. You should travel out the residue every bit is.
---------
private void ClickMe_Click(object sender, RoutedEventArgs e)
{
ClickMe.FontSize = 50;
}
---------------------
Now if you lot BUILD the projection in addition to run every bit described inwards the before postal service you lot would encounter the following:
winPhoneStep25
Now you lot tin ship away click the Run push (Green arrow-head) amongst the next setting:
winPhoneStep26
After around processing your application displays amongst the start upwardly page the following:
winPhoneStep27
After the start this is the offset page.
winPhoneStep28
in addition to when you lot click the push changes to this:
winPhoneStep29
That is all in that place is to it!
Happy New Year
Komentar
Posting Komentar