[12762] | 1 | <Page x:Class="WpfTestSvgSample.SvgPage"
|
---|
| 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
---|
| 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
---|
| 4 | xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
---|
| 5 | Title="SvgPage">
|
---|
| 6 | <DockPanel LastChildFill="True">
|
---|
| 7 | <ToolBar DockPanel.Dock="Top" Height="32">
|
---|
| 8 | <ToolBar.Resources>
|
---|
| 9 | <Style TargetType="{x:Type Image}">
|
---|
| 10 | <Style.Triggers>
|
---|
| 11 | <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}, AncestorLevel=1}, Path=IsEnabled}" Value="False">
|
---|
| 12 | <Setter Property="Opacity" Value="0.30" />
|
---|
| 13 | </DataTrigger>
|
---|
| 14 | </Style.Triggers>
|
---|
| 15 | </Style>
|
---|
| 16 | </ToolBar.Resources>
|
---|
| 17 | <Button Click="OnOpenFileClick">
|
---|
| 18 | <Image Source="Images/Open.png" Height="16"/>
|
---|
| 19 | </Button>
|
---|
| 20 | <Button Click="OnSaveFileClick">
|
---|
| 21 | <Image Source="Images/Save.png" Height="16"/>
|
---|
| 22 | </Button>
|
---|
| 23 | <Separator/>
|
---|
| 24 | <Button Command="Cut">
|
---|
| 25 | <Image Source="Images/Cut.png" Height="16"/>
|
---|
| 26 | </Button>
|
---|
| 27 | <Button Command="Copy">
|
---|
| 28 | <Image Source="Images/Copy.png" Height="16"/>
|
---|
| 29 | </Button>
|
---|
| 30 | <Button Command="Paste">
|
---|
| 31 | <Image Source="Images/Paste.png" Height="16"/>
|
---|
| 32 | </Button>
|
---|
| 33 | <Button Command="Delete">
|
---|
| 34 | <Image Source="Images/Delete.png" Height="16"/>
|
---|
| 35 | </Button>
|
---|
| 36 | <Separator/>
|
---|
| 37 | <Button Command="Undo">
|
---|
| 38 | <Image Source="Images/Undo.png" Height="16"/>
|
---|
| 39 | </Button>
|
---|
| 40 | <Button Command="Redo">
|
---|
| 41 | <Image Source="Images/Redo.png" Height="16"/>
|
---|
| 42 | </Button>
|
---|
| 43 | <Separator/>
|
---|
| 44 | <CheckBox IsChecked="{Binding ElementName=textEditor,Path=WordWrap}">
|
---|
| 45 | <Image Source="Images/WordWrap.png" Height="16"/>
|
---|
| 46 | </CheckBox>
|
---|
| 47 | <CheckBox IsChecked="{Binding ElementName=textEditor,Path=ShowLineNumbers}">
|
---|
| 48 | <Image Source="Images/PageNumber.png" Height="16"/>
|
---|
| 49 | </CheckBox>
|
---|
| 50 | <CheckBox IsChecked="{Binding ElementName=textEditor,Path=Options.ShowEndOfLine}">
|
---|
| 51 | <TextBlock Width="16" TextAlignment="Center">¶</TextBlock>
|
---|
| 52 | </CheckBox>
|
---|
| 53 | <ComboBox Name="highlightingComboBox" Width="100"
|
---|
| 54 | SelectedItem="{Binding SyntaxHighlighting, ElementName=textEditor}"
|
---|
| 55 | ItemsSource="{Binding Source={x:Static avalonEdit:HighlightingManager.Instance}, Path=HighlightingDefinitions}"
|
---|
| 56 | SelectionChanged="OnHighlightingSelectionChanged"/>
|
---|
| 57 | <Separator/>
|
---|
| 58 | <TextBox Name="searchTextBox" Width="200" KeyUp="OnSearchTextBoxKeyUp" />
|
---|
| 59 | <Button Click="OnSearchTextClick">
|
---|
| 60 | <Image Source="Images/Find.png" Height="16"/>
|
---|
| 61 | </Button>
|
---|
| 62 | <Separator/>
|
---|
| 63 | <Button Command="Print">
|
---|
| 64 | <Image Source="Images/Print.png" Height="16"/>
|
---|
| 65 | </Button>
|
---|
| 66 | <Button Command="PrintPreview">
|
---|
| 67 | <Image Source="Images/PrintPreview.png" Height="16"/>
|
---|
| 68 | </Button>
|
---|
| 69 | </ToolBar>
|
---|
| 70 |
|
---|
| 71 | <avalonEdit:TextEditor Name="textEditor" FontFamily="Consolas" FontSize="10pt"/>
|
---|
| 72 | </DockPanel>
|
---|
| 73 | </Page>
|
---|