Last active
May 22, 2018 03:51
-
-
Save gsedubun/fd4003821065a1ce7343625a607bde74 to your computer and use it in GitHub Desktop.
ViewA.xaml is a view to display the announcement list and details of the selected announcement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid > | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="1*"/> | |
</Grid.ColumnDefinitions> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="2*" MaxHeight="200" ScrollViewer.VerticalScrollBarVisibility="Auto"/> | |
<RowDefinition Height="2*" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto"/> | |
</Grid.RowDefinitions> | |
<ListBox x:Name="lbNewsAnnouncement" Grid.Column="0" Grid.Row="0" ItemsSource="{Binding NewsAnnouncement.Items}" ScrollViewer.VerticalScrollBarVisibility="Auto" > | |
<ListBox.ItemTemplate> | |
<DataTemplate > | |
<TextBlock Text="{Binding Title}"> | |
<TextBlock.InputBindings> | |
<MouseBinding Gesture="LeftClick" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Path=DataContext.SelectArticle}" CommandParameter="{Binding Id}" /> | |
</TextBlock.InputBindings> | |
</TextBlock> | |
</DataTemplate> | |
</ListBox.ItemTemplate> | |
</ListBox> | |
<ScrollViewer Grid.Column="0" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.CanContentScroll="True"> | |
<StackPanel HorizontalAlignment="Left" Margin="10" > | |
<TextBlock x:Name="txtJudul" Text="{Binding Announcement.Title}" FontSize="28"/> | |
<TextBlock x:Name="txtImageurl" Text="{Binding Announcement.ImageUrl}" Visibility="Hidden"/> | |
<TextBlock x:Name="txtPublishDate" Text="{Binding Announcement.PublishedDate}" /> | |
<Image x:Name="artilceImg" Source="{Binding Announcement.ImageUrl}" MaxWidth="300" MaxHeight="350"/> | |
<wpf:HtmlLabel x:Name="htmlContent" Text="{Binding Announcement.Contents}" /> | |
</StackPanel> | |
</ScrollViewer> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment