Answers for "set datacontext in xaml"

1

wpf setting data context

//Inside your XAML
<Window.DataContext>
	<local:FilterElements/>
</Window.DataContext>
//FilterElements being a class you created
Posted by: Guest on March-02-2020
0

set datacontext in xaml

<Window x:Class="SampleApplication.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:SampleApplication"
    Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
   <local:Employee/>
</Window.DataContext>
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language