mekasu0124

Untitled

Feb 29th, 2024
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.10 KB | None | 0 0
  1. <UserControl
  2.    x:Class="Diary.Views.MainView"
  3.    xmlns="https://github.com/avaloniaui"
  4.    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5.    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6.    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7.    xmlns:vm="using:Diary.ViewModels"
  8.    d:DesignHeight="450"
  9.    d:DesignWidth="800"
  10.    x:DataType="vm:MainViewModel"
  11.    mc:Ignorable="d">
  12.  
  13.     <Grid RowDefinitions="auto, *">
  14.         <Menu>
  15.             <MenuItem Command="{Binging LogoutCommand}" Header="Logout" />
  16.         </Menu>
  17.  
  18.         <Grid Grid.Row="1" ColumnDefinitions="150,*" RowDefinitions="auto,*">
  19.             <TextBlock Text="{Binding LoggedInUserName}" />
  20.  
  21.             <ListBox Grid.Row="1" ItemsSource="{Binding Documents}" SelectedItem="{Binding SelectedDocument}">
  22.                 <ListBox..ItemTemplate>
  23.                     <DataTemplate x:DataType="vm:DocumentViewModel">
  24.                         <TextBlock Text="{Binding Title}" />
  25.                     </DataTemplate>
  26.                 </ListBox..ItemTemplate>
  27.             </ListBox>
  28.            
  29.             <ContentControl Grid.RowSpan="2" Grid.Column="1" Content="{Binding SelectedDocument}" />
  30.         </Grid>
  31.     </Grid>
  32.    
  33. </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment