Thursday, November 10, 2016

WrapPanel and ListBox in WPF application using C#

7:52 AM - By azeheruddin khan 0

Explanation: - WrapPanel is a control which is used to wrap a group of elements horizontally. ListBox is used to wrap a group of elements serially in the form of a list. A TextBlock is used to write some content. All these controls are classes of System.Windows.Controls namespace.

Program to show WrapPanel and ListBox

MainWindow.xaml

<Window x:Class="Wrappanel.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <WrapPanel>
            <Image Source="c:\AJAY DESAI JPAL PHOTO.jpg"></Image>
            <ListBox>
            <TextBlock FontFamily="Times New Roman" FontSize="18">NAME: AJAY DESAI</TextBlock>
             <Line></Line>
            <TextBlock FontSize="16" FontFamily="Times New Roman">QUALIFICATION: M.Tech</TextBlock>
            <Line></Line>
            <TextBlock FontSize="16" FontFamily="Times New Roman">DESIGNATION: ASSISTANT PROFESSOR</TextBlock>
            <Line></Line>
             <TextBlock FontSize="16" FontFamily="Times New Roman">EMPLOYED IN SNIST</TextBlock>    
            </ListBox>
        </WrapPanel>
    </Grid>
</Window>



OutPut:




About the Author

I am Azeheruddin Khan having more than 6 year experience in c#, Asp.net and ms sql.My work comprise of medium and enterprise level projects using asp.net and other Microsoft .net technologies. Please feel free to contact me for any queries via posting comments on my blog,i will try to reply as early as possible. Follow me @fresher2programmer
View all posts by admin →

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

adsense

© 2014 Fresher2Programmer. WP Theme-junkie converted by Bloggertheme9
Powered by Blogger.
back to top