xaml - Multi-targeted WP7.1/WP8 app with Windows Phone Toolkit (Panorama / LongListSelector) -
was wondering if had idea of how handle this.
in wp7.1, can utilize excellent windows phone toolkit include useful controls such longlistselector , panorama. these part of microsoft.phone.controls.toolkit assembly.
in wp8, not need toolkit 2 controls because they're part of official microsoft.phone.controls assembly.
i have multi-targeted app have 2 phone projects, wp71 , wp80, link files in wp80 files in wp71.
this works great until try use panorama or longlistselector control in xaml page. in wp80 project, if reference wp80 dll of phone toolkit, not include 2 aforementioned controls because, surprise, they're present.
the issue is, wp71 needs namespace declaration @ top of xaml , namespace different both projects.
wp71:
xmlns:toolkit="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls.toolkit" <toolkit:panorama /> wp80:
xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" <phone:panorama /> i cannot build projects because each project thinks namespace incorrect if use 1 because need point different assemblies.
i don't think can use compile constants in xaml, otherwise fix.
my workaround reference older wp71 dll in wp80 project. other 3rd party libraries bind against official 8.0 sdk dll (caliburn, in case) causes problems.
how can solve pickle? idea off top of head resort code-behind create instance of control :( there better way?
don't use link, create separate view each.
another solution might create panoramaex control in each of relative projects , inherit panorama. view reference panoramaex control , still use link single view. that's if both ui projects have same namespace.
edit: isn't panorama wp7 in namespace:
xmlns:controls="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone.controls" i use initial solution progressbar , performanceprogressbar, have progressbarex in each ui project, wp7 1 inherits progressbar , wp8 1 inherits performanceprogressbar , in views reference progressbarex.
Comments
Post a Comment