Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

XAML Online Test

Topics Covered

  • Validations
  • Styles
  • Form Sections
  • Panels

Useful for hiring

  • XAML Developer
  • Sr. XAML Developer
  • .NET Engineer - XAML

Start hiring job-fit candidates using this assessment

GET A DEMO

"We are impressed by the caliber, depth, and breadth of the assessments provided by Interview Mocha. With Interview Mocha's online proctoring & powerful reports, we are able to hire quality candidates overcoming geographical barriers."

Megan Akhras, J'Excelle,Canada,
Co-founder & director
Question

How to create MediaElement control that handles the media when it has finished playing?

Answer
    • <MediaElement x:Name=”MediaElement1? AutoPlay=”True” CurrentStateChanged=”MediaElement1_CurrentStateChanged” />

    • <MediaElement x:Name=”MediaElement1? AutoPlay=”True” MediaEnded=”MediaElement1_MediaEnded”/>

    • <MediaElement x:Name=”MediaElement1? AutoPlay=”True” MarkerReached=”MediaElement1_MarkerReached”/>

Question

Which code will simulate simple login form?

Answer
    • <Label VerticalAlignment="Stretch" Style="{StaticResource TitleStyle}" Row="0" Column="0" ColumnSpan="3" Content="Login" Foreground="#FFFBF9F9"
      FontWeight="Bold" FontSize="14" />
      <Label VerticalAlignment="Center" Row="1" Column="0" Content="Username" Margin="5,5"></Label>
      <TextBox Name="TxtName" VerticalAlignment="Center" Row="1" Column="1" ColumnSpan="2" Text="{Binding UsernameContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" BorderBrush="Gray"
      Margin="5,5" HorizontalAlignment="Stretch"/>
      <Label VerticalAlignment="Center" Row="2" Column="0" Content="Password" Margin="5,5"/>
      <PasswordBox VerticalAlignment="Center" Name="txtPassword" Row="2" Column="1" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="1,1"
      Margin="5,5" HorizontalAlignment="Stretch" Loaded="txtPassword_Loaded" />
      <Button Row="3" Width="84" HorizontalAlignment="Right" Column="2" Margin="5,5"
      Content="Login" Command="{Binding Path=LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" FontSize="12" IsDefault="True"/>

    • <Label VerticalAlignment="Stretch" Style="{StaticResource TitleStyle}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Content="Login" Foreground="#FFFBF9F9"
      FontWeight="Bold" FontSize="14"
      <Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Content="Username" Margin="5,5"></Label>
      <Text Name="TxtName" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding UsernameContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" BorderBrush="Gray"
      Margin="5,5" HorizontalAlignment="Stretch"/>
      <Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Content="Password" Margin="5,5"/>
      <Password VerticalAlignment="Center" Name="txtPassword" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="1,1"
      Margin="5,5" HorizontalAlignment="Stretch" Loaded="txtPassword_Loaded"
      <Button Grid.Row="3" Width="84" HorizontalAlignment="Right" Grid.Column="2" Margin="5,5"
      Content="Login" Command="{Binding Path=LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" FontSize="12" IsDefault="True"/>

    • <Label VerticalAlignment="Stretch" Style="{StaticResource TitleStyle}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Content="Login" Foreground="#FFFBF9F9"
      FontWeight="Bold" FontSize="14" />
      <Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Content="Username" Margin="5,5"></Label>
      <TextBox Name="TxtName" VerticalAlignment="Center" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding UsernameContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" BorderBrush="Gray"
      Margin="5,5" HorizontalAlignment="Stretch"/>
      <Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Content="Password" Margin="5,5"/>
      <PasswordBox VerticalAlignment="Center" Name="txtPassword" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="1,1"
      Margin="5,5" HorizontalAlignment="Stretch" Loaded="txtPassword_Loaded" />
      <Button Grid.Row="3" Width="84" HorizontalAlignment="Right" Grid.Column="2" Margin="5,5"
      Content="Login" Command="{Binding Path=LoginCommand}" CommandParameter="{Binding ElementName=txtPassword}" FontSize="12" IsDefault="True"/>

Question

I want to implement tree view in my application. Which code snippets should I use?

Answer
    • <Hierarchical DataType="{x:Type local:TreeViewUserType}"
      ItemsSource = "{Binding Path=TreeViewUsers}" >
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </Hierarchical>

      <Hierarchical DataType="{x:Type local:TreeViewUser}">
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </Hierarchical>

    • <HierarchicalDataTemplate DataType="{x:Type local:TreeViewUserType}"
      ItemsSource = "{Binding Path=TreeViewUsers}" >
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </HierarchicalDataTemplate>

      <HierarchicalDataTemplate DataType="{x:Type local:TreeViewUser}">
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </HierarchicalDataTemplate>

    • <HierarchicalTemplate DataType="{x:Type local:TreeViewUserType}"
      ItemsSource = "{Binding Path=TreeViewUsers}" >
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </HierarchicalTemplate>

      <HierarchicalTemplate DataType="{x:Type local:TreeViewUser}">
      <TextBlock Margin="5,1,5,3" Text="{Binding Path=Model.Name}" />
      </HierarchicalTemplate>

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO