Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get datacontext of itemscontrol item c#

//assuming your itemssontrol items each have a click event:
private void Button_Click(object sender, RoutedEventArgs e) 
{ 
    var vm = (sender as FrameworkElement).DataContext; 
	//can cast to specific class type from here
Comment

PREVIOUS NEXT
Code Example
Csharp :: UnityEngine.Mesh:get_vertices() 
Csharp :: hierachical table to c# class 
Csharp :: c# bitwise and 
Csharp :: get 24 hour time in c# 
Csharp :: c# entity framework order by array 
Csharp :: aps.net core mvc chek box 
Csharp :: Unity android plugin callback 
Csharp :: wpf loop through grid rows 
Csharp :: list to array f# 
Csharp :: autoclicker for yes/no in c# indicator 
Csharp :: declare a delegate 
Csharp :: static variables 
Csharp :: Helper Routine GetRect¶ Calculates the area of a scaled down page: 
Csharp :: sequelize instance method is not a function 
Csharp :: salary, overtime, deductions, gross pay and netpay in console C# 
Csharp :: Derived classes of abstract class share property 
Csharp :: select startup item visual studio 2019 
Csharp :: how to use mongodb search index in c# 
Csharp :: c# increment by 2 
Csharp :: move dotnet dlls to another folder 
Csharp :: hardcode dropdown cshtml 
Csharp :: instance vs initiate 
Csharp :: how to connect google play services in unity 
Csharp :: c# bitwise xor 
Csharp :: .net core executenonqueryasync transaction 
Csharp :: how to remove a parten transform unity 
Csharp :: how to initialize array in c# 
Csharp :: parsing object from text file c# 
Csharp :: c# ipaddress to integer 
Csharp :: translate english to spanish 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =