TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mrityunjoy Bayan
NA
4
919
How to open a User Control on click a row ??
Oct 6 2017 3:56 AM
I want to open a new user control if I click on any row? How to do this please help me.
MainWindow.xaml
<
Grid
>
<
ListView
Margin
=
"10"
Name
=
"lvUsers"
>
<
ListView.View
>
<
GridView
>
<
GridViewColumn
Header
=
"Name"
Width
=
"120"
DisplayMemberBinding
=
"{Binding Name}"
/>
<
GridViewColumn
Header
=
"Age"
Width
=
"50"
DisplayMemberBinding
=
"{Binding Age}"
/>
<
GridViewColumn
Header
=
"Mail"
Width
=
"150"
>
<
GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Mail}"
TextDecorations
=
"Underline"
Foreground
=
"Blue"
Cursor
=
"Hand"
/>
</
DataTemplate
>
</
GridViewColumn.CellTemplate
>
</
GridViewColumn
>
<
GridViewColumn
Header
=
"Next Menu"
Width
=
"Auto"
>
<
GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
Button
Content
=
"Details"
/>
</
DataTemplate
>
</
GridViewColumn.CellTemplate
>
</
GridViewColumn
>
</
GridView
>
</
ListView.View
>
</
ListView
>
</
Grid
>
MainWindow.xaml.cs
namespace
Listview
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
List<User> items =
new
List<User>();
items.Add(
new
User() { Name =
"John Doe"
, Age = 42, Mail =
"
[email protected]
"
});
items.Add(
new
User() { Name =
"Jane Doe"
, Age = 39, Mail =
"
[email protected]
"
});
items.Add(
new
User() { Name =
"Sammy Doe"
, Age = 7, Mail =
"
[email protected]
"
});
lvUsers.ItemsSource = items;
}
}
public
class
User
{
public
string
Name {
get
;
set
; }
public
int
Age {
get
;
set
; }
public
string
Mail {
get
;
set
; }
}
}
Reply
Answers (
2
)
Calculating third point when start center point,sweep angle
About Calculating Angle