Files
crosslangdevstudio/Views/CRVMViewerView.axaml
2025-10-22 17:31:32 -05:00

75 lines
3.6 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
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:vm="clr-namespace:CrossLangDevStudio.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="CrossLangDevStudio.Views.CRVMViewerView"
x:DataType="vm:CRVMViewerViewModel">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<vm:CRVMViewerViewModel />
</Design.DataContext>
<ScrollViewer>
<StackPanel Margin="20">
<TextBlock FontSize="42" Margin="0 5">Functions:</TextBlock>
<ItemsControl ItemsSource="{Binding Functions}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock>
<Run FontSize="24" Foreground="#6A9955" Text="{Binding Documentation}" />
<LineBreak />
<Run FontSize="24" Foreground="#569CD6" Text="func " />
<Run FontSize="24" Foreground="#DCDCAA" Text="{Binding Name}" />
<Run FontSize="24" Foreground="#C586C0" Text="(" />
<Run FontSize="24" Foreground="#CCCCCC" Text="{Binding Args}" />
<Run FontSize="24" Foreground="#C586C0" Text=")" />
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock FontSize="42" Margin="0 5">Classes:</TextBlock>
<ItemsControl ItemsSource="{Binding Classes}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock>
<Run FontSize="24" Foreground="#6A9955" Text="{Binding Documentation}" />
<LineBreak />
<Run FontSize="24" Foreground="#569CD6" Text="class " />
<Run FontSize="24" Foreground="#4EC9B0" Text="{Binding Name}" />
<Run FontSize="24" Foreground="#CCCCCC" Text="{Binding InheritsColon}" />
<Run FontSize="24" Foreground="#4EC9B0" Text="{Binding Inherits}" />
<Run FontSize="24" Foreground="#CCCCCC" Text=" {" />
</TextBlock>
<ItemsControl ItemsSource="{Binding Entries}" >
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock>
<LineBreak />
<Run FontSize="24" Foreground="#6A9955" Text="{Binding Documentation}" />
<LineBreak />
<Run FontSize="24" Foreground="#569CD6" Text="{Binding Modifiers}" />
<Run FontSize="24" Foreground="{Binding NameColor}" Text="{Binding Name}" />
<Run FontSize="24" Foreground="{Binding LeftParenColor}" Text="{Binding LeftParen}" />
<Run FontSize="24" Foreground="#CCCCCC" Text="{Binding Args}" />
<Run FontSize="24" Foreground="#C586C0" Text="{Binding RightParen}" />
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock>
<LineBreak />
<Run FontSize="24" Foreground="#CCCCCC" Text="}" />
</TextBlock>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</ScrollViewer>
</UserControl>
<!--4EC9B0-->