File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 6666 </materialDesign : PackIcon .Style>
6767 </materialDesign : PackIcon >
6868 </materialDesign : PopupBox .ToggleContent>
69- <Border MaxHeight =" 600" MaxWidth =" 800" >
70- <avalonEdit : TextEditor Document =" {Binding Xaml, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextDocumentValueConverter}}"
69+ <StackPanel >
70+ <Border MaxHeight =" 600" MaxWidth =" 800" >
71+ <avalonEdit : TextEditor Document =" {Binding Xaml, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TextDocumentValueConverter}}"
7172 Style =" {StaticResource AvalonTextEditorXamlDisplay}" />
72- </Border >
73+ </Border >
74+ <Button
75+ Margin =" 0 10 0 0"
76+ Tag =" {Binding Xaml, RelativeSource={RelativeSource TemplatedParent}}"
77+ Click =" CopyButton_onClick"
78+ HorizontalAlignment =" Right"
79+ Style =" {StaticResource MaterialDesignRaisedButton}"
80+ >
81+ COPY
82+ </Button >
83+ </StackPanel >
7384 </materialDesign : PopupBox >
7485 <Grid >
7586 <AdornerDecorator >
96107 </ResourceDictionary >
97108 </Application .Resources>
98109</Application >
110+
Original file line number Diff line number Diff line change 77using System . Threading ;
88using System . Threading . Tasks ;
99using System . Windows ;
10+ using System . Windows . Controls ;
1011using System . Windows . Markup ;
1112using ShowMeTheXAML ;
1213
@@ -30,5 +31,10 @@ protected override void OnStartup(StartupEventArgs e)
3031
3132 base . OnStartup ( e ) ;
3233 }
34+
35+ private void CopyButton_onClick ( object sender , RoutedEventArgs e ) {
36+ var toBeCopied = ( ( Button ) sender ) . Tag . ToString ( ) ;
37+ Clipboard . SetDataObject ( toBeCopied ) ;
38+ }
3339 }
3440}
You can’t perform that action at this time.
0 commit comments