|
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow"
WindowState="Maximized">
<DockPanel>
<DockPanel.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Orange" Offset="0" />
<GradientStop Color="#FFE54343" Offset="1" />
</LinearGradientBrush>
</DockPanel.Background>
<DockPanel Height="80" DockPanel.Dock="Top">
<TextBlock DockPanel.Dock="Left"
Text="Latest Articles"
VerticalAlignment="Center"
Margin="30,0,0,0" />
<Button x:Name="btnSearch"
Content="Invoke Request"
DockPanel.Dock="Left"
VerticalAlignment="Center"
Width="120"
Margin="10,0,0,0"
Click="btnSearch_Click"
IsDefault="True" />
<Button Name="btnCancel"
Content="Cancel"
DockPanel.Dock="Left"
VerticalAlignment="Center"
Width="120"
Margin="10,0,0,0"
Click="btnCancel_Click"
IsCancel="True" />
<StackPanel Orientation="Vertical" DockPanel.Dock="Right" VerticalAlignment="Center">
<Image Source="codeproject100x30.gif"
Stretch="None"
HorizontalAlignment="Right"
VerticalAlignment="Top" />
<TextBlock Name="tbstatus"
VerticalAlignment="Bottom"
TextAlignment="Right" />
</StackPanel>
</DockPanel>
<ListBox x:Name="lstArticles" ItemsSource="{Binding}">
<ListBox.GroupStyle>
<GroupStyle>
<GroupStyle.ContainerStyle>
<Style TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupItem}">
<Expander Header="{Binding Name}">
<ItemsPresenter />
</Expander>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</GroupStyle.ContainerStyle>
</GroupStyle>
</ListBox.GroupStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Title}" FontSize="20" Grid.ColumnSpan="2" />
<TextBlock Text="{Binding Description}" FontSize="12" Grid.ColumnSpan="2" Grid.Row="1" TextWrapping="Wrap"/>
<TextBlock Text="Published On" Grid.Row="2" Grid.Column="0" />
<TextBlock Text="{Binding }" Grid.Row="2" Grid.Column="1" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DockPanel>
</Window>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Did you like his post?
Oh, lets go a bit further to know him better.
Visit his Website :
www.abhisheksur.com to know more about Abhishek.
Abhishek also authored a book on .NET 4.5 Features and recommends you to read it, you will learn a lot from it.
http://bit.ly/EXPERTCookBook
Basically he is from India, who loves to explore the .NET world. He loves to code and in his leisure you always find him talking about technical stuffs.
Working as a VP product of
APPSeCONNECT, an integration platform of future, he does all sort of innovation around the product.
Have any problem? Write to him in his
Forum.
You can also mail him directly to
abhi2434@yahoo.com
Want a Coder like him for your project?
Drop him a mail to
contact@abhisheksur.com
Visit His Blog
Dotnet Tricks and Tips
Dont forget to vote or share your comments about his Writing