ComponentOne XapOptimizer works by extracting the individual files from the zipped archive, then using reflection to build a call tree. The call tree starts with the application's entry point and expands to determine all the classes that are used by the application. At the end of this process, any classes not used by the application are removed from the assemblies, which are then obfuscated and repackaged into a new XAP file.
ComponentOne XapOptimizer works by extracting the original XAP file, then inspecting MSIL instructions and XAML content to build a dependency tree. The dependency tree starts with the application's entry point and expands to determine all the classes and XAML resources that are used by the application. At the end of this process, any classes and XAML resources not used by the application are removed from the assemblies, which are then obfuscated, resigned and repackaged into a new XAP file.
This brief description skips over some important details. Most important is that the dependency analysis process performed by XapOptimizer cannot resolve dependencies when indirect instantiation mechanisms are used (using Reflection for example). For more information, see Classes Used Through Reflection.