Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8731747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:18:27+00:00 2026-06-13T09:18:27+00:00

In some of my smoke tests, I’m using Mono Cecil to parse the opcodes

  • 0

In some of my smoke tests, I’m using Mono Cecil to parse the opcodes of my assemblies. I then perform some operations to validate code quality, etc. However, I don’t really care about generated code in designers because there isn’t much I can do about that, so I will exclude the InitializeComponent method. This worked fine for WinForms, but doesn’t appear to work for xaml. In other words, I’m still processing the instructions in xaml (i.e. Events being subscribed to). I know xaml is “compiled” into baml and not IL, but Mono Cecil is apparently still able to get the OpCodes from baml).

I read here and here that in xaml, the InitializeComponent calls the Application.LoadComponent method, so I tried to exclude that as well, but I was still processing the xaml instructions. I specifically am checking for event handler subscription.

My Question: Are there any other “under the hood” methods that are called when compiling the xaml other than InitializeComponent or LoadComponent? In other words, how can I distinguish instructions that come from the code-behind (xaml.cs) vs xaml?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:18:31+00:00Added an answer on June 13, 2026 at 9:18 am

    So, digging through MSDN, I found this little gem.

    Apparently, the IComponentConnector is what handles both the InitializeComponent as well as the Connect (which handles the event subscription). So there’s a little lesson about WPF vs Winforms, events are set up in InitializeComponent.

    So, the method to exclude is:

    System.Windows.Markup.IComponentConnector.Connect();

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing some smoke tests to our website. I'm using a Given/When/Then format
We are running some smoke tests on our EC2 systems and occasionally the VM
i am using smoke.js to create some neat alerts :) the problem comes when
I am applying Animation Drawable with some smoke like animation. It works properly everywhere
Some clients experience an app crash directly when they launch it. Here's the code
Some simple code: - (IBAction)Up_Down:(UIStepper *)sender { double value = [sender value]; [NumDayLabel setText:[NSString
Some context for this code, what I am trying to do is create a
I am using XNA my rocket is creating smoke objects when it fly. I
This is an attempt to rewrite some old homework using STL algorithms instead of
I am considering to write smoke tests for our WPF application. The question that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.