-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
128 lines (105 loc) · 4.86 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Toast by mrousavy</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/Toast/assets/css/style.css?v=4155258170ff528c63430b2949af7a27419ccd67">
<link rel="icon" type="image/ico" href="https://github.com/mrousavy/Toast/blob/master/ToastDemo/Resources/Toast_Icon.ico?raw=true"/>
</head>
<body>
<section class="page-header">
<div align="left"><a href="https://mrousavy.github.io" class="btn">🏠 Homepage</a></div>
<img src="https://github.com/mrousavy/Toast/blob/master/ToastDemo/Resources/Toast_Icon.ico?raw=true" width="124" />
<h1 class="project-name">Toast</h1>
<h2 class="project-tagline">Android Toast for WPF</h2>
<a href="https://github.com/mrousavy/Toast" class="btn">View on GitHub</a>
<a href="https://www.nuget.org/packages/AndroidToast/" class="btn">View on NuGet</a>
</section>
<section class="main-content">
<p>Android Toast for WPF</p>
<p><a href="https://github.com/mrousavy/Toast/raw/master/ToastDemo/bin/Release/ToastDemo.zip">Download the Demo (.exe)</a></p>
<h1 id="how-to-use">How to use</h1>
<h3 id="add-binaries">1. Add Binaries</h3>
<ul>
<li>NuGet
<ul>
<li><a href="https://www.nuget.org/packages/AndroidToast">Android Toast is also available on NuGet!</a> Install by typing <code class="highlighter-rouge">Install-Package AndroidToast</code> in NuGet Package Manager Console. (Or search for <code class="highlighter-rouge">AndroidToast</code> on NuGet)</li>
</ul>
</li>
<li>Manually
<ol>
<li><a href="https://github.com/mrousavy/Toast/raw/master/Toast/bin/Release/Toast.dll">Download the latest Library (.dll)</a></li>
<li>Add the .dll to your Project (Right click <code class="highlighter-rouge">References</code> in the Project Tree View, click <code class="highlighter-rouge">Add References</code> and <code class="highlighter-rouge">Browse</code> to the <code class="highlighter-rouge">.dll</code> File)</li>
</ol>
</li>
</ul>
<h3 id="add-the-reference">2. Add the reference</h3>
<ul>
<li>XAML Window</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>
<Window x:Class=”ToastDemo.MainWindow”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
xmlns:d=”http://schemas.microsoft.com/expression/blend/2008”
xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006”
xmlns:local=”clr-namespace:ToastDemo”
//IMPORTANT LINE!
xmlns:toast="clr-namespace:Toast;assembly=Toast"
mc:Ignorable="d"
Title="Toast Demo" Height="350" Width="525">
</code></pre>
</div>
<ul>
<li>C# (using) </li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>
using Toast;
</code></pre>
</div>
<h3 id="add-toast-to-xaml-or-in-code">3. Add Toast to XAML or in Code</h3>
<ul>
<li>XAML</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>
<toast:Toast x:Name="myToast" Message="Hello World!" Duration="0:0:0:5" />
</code></pre>
</div>
<ul>
<li>C#</li>
</ul>
<div class="highlighter-rouge"><pre class="highlight"><code>
Toast.Toast myToast = new Toast.Toast();
myToast.DurationToast = Toast.Toast.ToastDuration.Long;
myToast.Message = “Hello World!”;
someControl.Children.Add(myToast);
someOtherControl.Content = myToast;
</code></pre>
</div>
<h3 id="set-desired-parameters">4. Set desired Parameters:</h3>
<ul>
<li><code class="highlighter-rouge">Toast.Duration</code>/<code class="highlighter-rouge">Toast.DurationToast</code></li>
<li><code class="highlighter-rouge">Toast.Message</code>/<code class="highlighter-rouge">Toast.Content</code></li>
<li><code class="highlighter-rouge">Toast.DurationAnimation</code></li>
</ul>
<h3 id="show-toast">5. Show Toast:</h3>
<ul>
<li><code class="highlighter-rouge">myToast.Show();</code></li>
</ul>
<h3 id="optional-hide-toast">6. (Optional) Hide Toast:</h3>
<ul>
<li><code class="highlighter-rouge">myToast.Hide();</code></li>
</ul>
<h1 id="screenshot">Screenshot</h1>
<p><img src="http://i.imgur.com/Wikjo4z.png"></p>
<p><img src="https://i.gyazo.com/b9d2f30c6c3d4169f8256e9ea2580b06.gif"></p>
<h1 id="thanks-for-using-toast">Thanks for using Toast!</h1>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/mrousavy/Toast">Toast</a> is maintained by <a href="https://github.com/mrousavy">mrousavy</a>.</span>
</footer>
</section>
</body>
</html>