MainWindow.xaml 4.77 KB
Newer Older
1 2 3 4 5
<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:MySocialPortalDesktop.ViewModels;assembly=MySocialPortalDesktop"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
HankG's avatar
HankG committed
6
        xmlns:views="clr-namespace:MySocialPortalDesktop.Views;assembly=MySocialPortalDesktop"
7 8
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600"
        Width="800" Height="600"
9 10 11 12 13 14 15 16
        x:Class="MySocialPortalDesktop.Views.MainWindow"
        Icon="/Assets/avalonia-logo.ico"
        Title="MySocialPortalDesktop">

    <Design.DataContext>
        <vm:MainWindowViewModel/>
    </Design.DataContext>

HankG's avatar
HankG committed
17
    <DockPanel>
HankG's avatar
HankG committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
        <RibbonControl DockPanel.Dock="Top" Margin="0,0,0,5">
            <RibbonTab Header="Main">
                <StackPanel Orientation="Horizontal">
                    <RibbonTabGroup Text="Navigation">
                        <StackPanel Orientation="Horizontal">
                            <RibbonButton IconPath="/Assets/RibbonIcons/home.png" Text="Home" Command="{Binding GoHome}"/>
                        </StackPanel>
                    </RibbonTabGroup>
                    <RibbonTabGroup Text="Feeds">
                        <StackPanel Orientation="Horizontal">
                            <RibbonButton IconPath="/Assets/RibbonIcons/arrow-left-bold-box.png" Command="{Binding LoadOlder}">
                                <ToolTip.Tip>
                                    <TextBlock Text="Load Older Posts"></TextBlock>
                                </ToolTip.Tip>
                            </RibbonButton>
                            <RibbonButton IconPath="/Assets/RibbonIcons/arrow-right-bold-box.png" Command="{Binding LoadNewer}">
                                <ToolTip.Tip>
                                    <TextBlock Text="Load Latest Posts"></TextBlock>
                                </ToolTip.Tip>
                            </RibbonButton>
38 39 40 41 42 43 44 45 46 47
                            <RibbonComboButton Name="RefreshPeopleInList" IconPath="/Assets/RibbonIcons/refresh.png" Items="{Binding UserLists}">
                                <RibbonComboButton.DataTemplates>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}" Margin="3"/>
                                    </DataTemplate>
                                </RibbonComboButton.DataTemplates>
                                <ToolTip.Tip>
                                    <TextBlock Text="Refresh Posts from users in list"/>
                                </ToolTip.Tip>
                            </RibbonComboButton>
HankG's avatar
HankG committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
                        </StackPanel>
                    </RibbonTabGroup>
                    <RibbonTabGroup Text="Import">
                        <StackPanel Orientation="Horizontal">
                            <RibbonButton IconPath="/Assets/RibbonIcons/account-arrow-right.png" Text="People" Command="{Binding ImportPeople}"/>
                            <RibbonButton IconPath="/Assets/RibbonIcons/file-document-box-multiple.png" Text="Posts" Command="{Binding ImportPosts}"/>
                        </StackPanel>
                    </RibbonTabGroup>
                </StackPanel>
            </RibbonTab>
            <RibbonTab Header="Settings">
                <StackPanel Orientation="Horizontal">
                    <RibbonTabGroup Text="Application">
                        <StackPanel Orientation="Horizontal">
                            <RibbonButton IconPath="/Assets/RibbonIcons/settings.png" Text="Application"/>
                        </StackPanel>
                    </RibbonTabGroup>
                    <RibbonTabGroup Text="User">
                        <StackPanel Orientation="Horizontal">
                            <RibbonButton IconPath="/Assets/RibbonIcons/account-edit.png" Text="User Data"/>
                        </StackPanel>
                    </RibbonTabGroup>
                </StackPanel>
            </RibbonTab>
        </RibbonControl>        
73 74 75 76 77
        <Grid Name="MainGrid">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
78
                <ColumnDefinition MinWidth="300" Width="300"/>
79 80 81
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
HankG's avatar
HankG committed
82
            <views:PeopleListView Grid.Row="0" Grid.Column="0" Margin="2" DataContext="{Binding PeopleListViewModel}"/>
83
            <GridSplitter Grid.Row="0" Grid.Column="1"/>
HankG's avatar
HankG committed
84
            <views:PostTimelineView Grid.Row="0" Grid.Column="2" Margin="5" DataContext="{Binding PostTimelineViewModel}"/>
HankG's avatar
HankG committed
85 86
        </Grid>
    </DockPanel>
87
</Window>