Skip to content

Commit

Permalink
update main window with formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzzerd committed Sep 15, 2023
1 parent 22390f7 commit 91df025
Showing 1 changed file with 55 additions and 58 deletions.
113 changes: 55 additions & 58 deletions SharpFM.App/MainWindow.axaml
Original file line number Diff line number Diff line change
@@ -1,77 +1,74 @@
<Window xmlns="https://github.com/avaloniaui"
<Window
x:Class="SharpFM.App.MainWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:SharpFM.App.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:AvaloniaEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
mc:Ignorable="d" d:DesignWidth="700" d:DesignHeight="500"
Width="700" Height="500"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:behaviors="clr-namespace:SharpFM.App.Behaviors;assembly=SharpFM.App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:SharpFM.App.ViewModels"
Title="SharpFM"
Width="700"
Height="500"
d:DesignHeight="500"
d:DesignWidth="700"
x:DataType="vm:MainWindowViewModel"
x:Class="SharpFM.App.MainWindow"
Title="SharpFM">
mc:Ignorable="d">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_New"
Command="{Binding NewEmptyItemCommand}"/>
<Separator/>
<MenuItem Header="_Exit" Command="{Binding ExitApplicationCommand}" />
<MenuItem Command="{Binding NewEmptyItemCommand}" Header="_New" />
<Separator />
<MenuItem Command="{Binding ExitApplicationCommand}" Header="_Exit" />
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem
Header="Copy"
Command="{Binding CopySelectedToClipCommand}"/>
<MenuItem
Header="Paste"
Command="{Binding PasteTextCommand}"/>
<MenuItem Command="{Binding CopySelectedToClipCommand}" Header="Copy" />
<MenuItem Command="{Binding PasteTextCommand}" Header="Paste" />
</MenuItem>
<MenuItem Header="Transform">
<MenuItem Header="Copy as C# Class" Command="{Binding CopyAsClassCommand}"/>
<MenuItem Command="{Binding CopyAsClassCommand}" Header="Copy as C# Class" />
</MenuItem>
</Menu>
<TextBlock/>
<TextBlock />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="225" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="225" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<ListBox
Grid.Column="0"
ItemsSource="{Binding Keys}"
SelectedItem="{Binding SelectedClip}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,8">
<TextBox Text="{Binding Name, Mode=TwoWay}" Margin="0" />
<ComboBox
ItemsSource="{Binding ClipTypes}"
SelectedValue="{Binding ClipboardFormat, Mode=TwoWay}"
SelectedValueBinding="{Binding KeyId}"
DisplayMemberBinding="{Binding DisplayName}"
>
</ComboBox>
<TextBlock Text="{Binding ClipboardFormat}" MaxLines="1" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox
Grid.Column="0"
ItemsSource="{Binding Keys}"
SelectedItem="{Binding SelectedClip}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,8">
<TextBox Margin="0" Text="{Binding Name, Mode=TwoWay}" />
<ComboBox
DisplayMemberBinding="{Binding DisplayName}"
ItemsSource="{Binding ClipTypes}"
SelectedValue="{Binding ClipboardFormat, Mode=TwoWay}"
SelectedValueBinding="{Binding KeyId}" />
<TextBlock MaxLines="1" Text="{Binding ClipboardFormat}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>

<AvaloniaEdit:TextEditor
Grid.Column="1"
x:Name="avaloniaEditor"
SyntaxHighlighting="Xml"
WordWrap="False"
ShowLineNumbers="True"
FontFamily="Cascadia Code,Consolas,Menlo,Monospace">
<i:Interaction.Behaviors>
<behaviors:DocumentTextBindingBehavior Text="{Binding SelectedClip.XmlData, Mode=TwoWay}"/>
</i:Interaction.Behaviors>
</AvaloniaEdit:TextEditor>
<AvaloniaEdit:TextEditor
x:Name="avaloniaEditor"
Grid.Column="1"
FontFamily="Cascadia Code,Consolas,Menlo,Monospace"
ShowLineNumbers="True"
SyntaxHighlighting="Xml"
WordWrap="False">
<i:Interaction.Behaviors>
<behaviors:DocumentTextBindingBehavior Text="{Binding SelectedClip.XmlData, Mode=TwoWay}" />
</i:Interaction.Behaviors>
</AvaloniaEdit:TextEditor>

</Grid>
</Grid>
</DockPanel>

</Window>

0 comments on commit 91df025

Please sign in to comment.