@@ -104,6 +104,127 @@ private async void PasteText_Click(object sender, RoutedEventArgs args)
104104 </controls : ControlExample .CSharp>
105105 </controls : ControlExample >
106106
107+ <!-- COPY AND PASTE AN IMAGE -->
108+ <controls : ControlExample
109+ x : Name =" Example3"
110+ HeaderText =" Copy and paste an image"
111+ CSharpSource =" Clipboard/ClipboardSample1_cs.txt" >
112+ <StackPanel VerticalAlignment =" Top" Spacing =" 10" >
113+ <Image
114+ x : Name =" SourceImage"
115+ Width =" 200"
116+ Height =" 150"
117+ HorizontalAlignment =" Left"
118+ AutomationProperties.Name=" Source image to copy"
119+ Source =" ms-appx:///Assets/SampleMedia/rainier.jpg"
120+ Stretch =" UniformToFill" />
121+ <StackPanel Orientation =" Horizontal" Spacing =" 8" >
122+ <Button
123+ Click =" CopyImage_Click"
124+ Content =" Copy Image to Clipboard" />
125+ <Button
126+ Click =" PasteImage_Click"
127+ Content =" Paste Image from Clipboard" />
128+ </StackPanel >
129+ <TextBlock
130+ x : Name =" ImageStatusText"
131+ Foreground =" {ThemeResource SystemFillColorSuccessBrush}"
132+ Text =" "
133+ Visibility =" Collapsed" />
134+ <Image
135+ x : Name =" PastedImage"
136+ Width =" 200"
137+ Height =" 150"
138+ HorizontalAlignment =" Left"
139+ AutomationProperties.Name=" Pasted image from clipboard"
140+ Stretch =" UniformToFill"
141+ Visibility =" Collapsed" />
142+ </StackPanel >
143+ </controls : ControlExample >
144+
145+ <!-- COPY AND PASTE FILES -->
146+ <controls : ControlExample
147+ x : Name =" Example4"
148+ HeaderText =" Copy and paste files"
149+ CSharpSource =" Clipboard/ClipboardSample2_cs.txt" >
150+ <StackPanel VerticalAlignment =" Top" Spacing =" 10" >
151+ <StackPanel Orientation =" Horizontal" Spacing =" 8" >
152+ <Button
153+ Click =" CopyFiles_Click"
154+ Content =" Copy Files to Clipboard" />
155+ <Button
156+ Click =" PasteFiles_Click"
157+ Content =" Paste Files from Clipboard" />
158+ </StackPanel >
159+ <TextBlock
160+ x : Name =" FilesStatusText"
161+ TextWrapping =" Wrap" />
162+ </StackPanel >
163+ </controls : ControlExample >
164+
165+ <!-- CLIPBOARD HISTORY AND ROAMING -->
166+ <controls : ControlExample
167+ x : Name =" Example5"
168+ HeaderText =" Clipboard history and roaming options"
169+ CSharpSource =" Clipboard/ClipboardSample3_cs.txt" >
170+ <StackPanel VerticalAlignment =" Top" Spacing =" 10" >
171+ <TextBox
172+ x : Name =" HistoryRoamingTextBox"
173+ Width =" 400"
174+ HorizontalAlignment =" Left"
175+ AutomationProperties.Name=" Text to copy with options"
176+ PlaceholderText =" Enter text to copy with options"
177+ Text =" Text with clipboard options" />
178+ <StackPanel Orientation =" Horizontal" Spacing =" 16" >
179+ <ToggleSwitch
180+ x : Name =" AllowHistoryToggle"
181+ Header =" Allow in History"
182+ IsOn =" True"
183+ AutomationProperties.Name=" Allow clipboard content in history" />
184+ <ToggleSwitch
185+ x : Name =" AllowRoamingToggle"
186+ Header =" Allow Roaming"
187+ IsOn =" True"
188+ AutomationProperties.Name=" Allow clipboard content to roam" />
189+ </StackPanel >
190+ <Button
191+ Click =" CopyWithOptions_Click"
192+ Content =" Copy with Options" />
193+ <TextBlock
194+ x : Name =" HistoryRoamingStatusText"
195+ TextWrapping =" Wrap" />
196+ <StackPanel Orientation =" Horizontal" Spacing =" 16" >
197+ <TextBlock x : Name =" HistoryEnabledText" />
198+ <TextBlock x : Name =" RoamingEnabledText" />
199+ </StackPanel >
200+ </StackPanel >
201+ </controls : ControlExample >
202+
203+ <!-- OTHER CLIPBOARD OPERATIONS -->
204+ <controls : ControlExample
205+ x : Name =" Example6"
206+ HeaderText =" Other clipboard operations"
207+ CSharpSource =" Clipboard/ClipboardSample4_cs.txt" >
208+ <StackPanel VerticalAlignment =" Top" Spacing =" 10" >
209+ <StackPanel Orientation =" Horizontal" Spacing =" 8" >
210+ <Button
211+ Click =" ShowFormats_Click"
212+ Content =" Show Clipboard Formats" />
213+ <Button
214+ Click =" ClearClipboard_Click"
215+ Content =" Clear Clipboard" />
216+ </StackPanel >
217+ <ToggleSwitch
218+ x : Name =" ContentChangedToggle"
219+ Header =" Monitor ContentChanged"
220+ AutomationProperties.Name=" Monitor clipboard content changed event"
221+ Toggled =" ContentChangedToggle_Toggled" />
222+ <TextBlock
223+ x : Name =" OtherOperationsStatusText"
224+ TextWrapping =" Wrap" />
225+ </StackPanel >
226+ </controls : ControlExample >
227+
107228 <VisualStateManager .VisualStateGroups>
108229 <VisualStateGroup x : Name =" ConfirmClipboardGroups" >
109230 <VisualState x : Name =" ConfirmationClipboardCollapsed" >
0 commit comments