This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Store the Messagebox result in result variable | |
MessageBoxResult result = MessageBox.Show("Do you wish to continue?", "Options", MessageBoxButton.OKCancel); | |
//check if user clicked on ok | |
if (result == MessageBoxResult.OK) | |
{ | |
//Add the task you wish to perform here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class CountryArrays | |
{ | |
/// <summary> | |
/// Country names | |
/// </summary> | |
public static string[] Names = new string[] | |
{ | |
"Afghanistan", | |
"Albania", | |
"Algeria", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Insert_Button_Click(object sender, RoutedEventArgs e) | |
{ | |
//Creating a new data object | |
var obj = new Database.Schema.Students | |
{ | |
Name = NameBox.Text, | |
Marks = Convert.ToInt32(MarksBox.Text) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IPAddress GetIPAddress() | |
{ | |
List<string> IpAddress = new List<string>(); | |
var Hosts = Windows.Networking.Connectivity.NetworkInformation.GetHostNames().ToList(); | |
foreach (var Host in Hosts) | |
{ | |
string IP = Host.DisplayName; | |
IpAddress.Add(IP); | |
} | |
IPAddress address = IPAddress.Parse(IpAddress.Last()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> | |
<TextBox x:Name="txtToTrans" HorizontalAlignment="Left" Height="72" | |
TextWrapping="Wrap" VerticalAlignment="Top" Width="446" | |
AcceptsReturn="True"/> | |
<Button Content="Translate" HorizontalAlignment="Left" Margin="10,131,0,0" | |
VerticalAlignment="Top" Width="436" Click="Button_Click_1"/> | |
<RadioButton x:Name="optFrench" Content="French" HorizontalAlignment="Left" | |
Margin="10,59,0,0" VerticalAlignment="Top" IsChecked="True" | |
Checked="optFrench_Checked"/> | |
<RadioButton x:Name="optSpanish" Content="Spanish" HorizontalAlignment="Left" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<controls:Gauge Width="136" | |
Height="136" | |
Margin="0" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Center" | |
FontSize="32" | |
Maximum="100" | |
ScaleBrush="Blue" | |
ScaleWidth="20" | |
Style="{StaticResource Gauge}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmlns:controls="using:Gauge.Controls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// A Modern UI Radial Gauge. | |
/// </summary> | |
[TemplatePart(Name = NeedlePartName, Type = typeof(Path))] | |
[TemplatePart(Name = ScalePartName, Type = typeof(Path))] | |
[TemplatePart(Name = TrailPartName, Type = typeof(Path))] | |
[TemplatePart(Name = ValueTextPartName, Type = typeof(TextBlock))] | |
public class Gauge : Control | |
{ | |
#region Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackPanel Background="{StaticResource ThemeColor}" Height="60" HorizontalAlignment="Center"> | |
<TextBlock Text="Hello World" Style="{StaticResource MyTextBlockStyle}"/> | |
</StackPanel> |
NewerOlder