Author Topic: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?  (Read 3115 times)

Offline abudwill

  • Full Member
  • ***
  • Posts: 148
  • Karma: 4
Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« on: October 28, 2016, 02:38:33 AM »
Wondering if anyone has tried to compile WDE 8.5.x provided sample project InteractionExtensionSample.

I have been trying to add a SideBarButton to one of the vertical regions in a custom project and am having problems doing that.

This sample demonstrates exactly what I am trying to do.

Specifically in the xaml file MySampleButtonView.xaml, Visual Studio pukes when it sees:

Code: [Select]
<commonControls:SideButton Name="splitToggleButton" Margin="2,2,0,0" Style="{DynamicResource SideButtonStyle}" Content="My _Sample" Click="splitToggleButton_Click" />

Specifically it pukes when trying to locate SideButtonStyle.

Anyone get this sample to compile yet?

Regards,
Andrew

Offline abudwill

  • Full Member
  • ***
  • Posts: 148
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #1 on: October 28, 2016, 02:39:33 AM »
For reference I am using VS2012

Offline abudwill

  • Full Member
  • ***
  • Posts: 148
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #2 on: October 29, 2016, 09:10:03 AM »
Crazy...  If the file MySampleButtonView.xaml is not open, it builds fine.

If that file is open, the project won't build.

Seems to have something to do with the XAML renderer bundled with Visual Studio.

Upon closing the xaml file, building, and running, the button that is defined in MySampleButtonView.xaml shows up as it should at runtime.

I guess no problem.  Bad luck.

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 119
  • Karma: 11
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #3 on: October 31, 2016, 06:07:01 PM »
I use VS 2013 and it compiled ok even when MySampleButtonView.xaml is open.

It does give a design time error for this part of the code 'Style="{DynamicResource SideButtonStyle}' (Object Reference Not set to an instance of an object), but it does compile and run.

Offline abudwill

  • Full Member
  • ***
  • Posts: 148
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #4 on: November 02, 2016, 01:11:31 AM »
Thanks for the feedback Pete.

I wish I knew why the built in xaml renderer wouldn't display the xaml properly.  In this particular case it is no big deal as I know what the xaml will end up looking like.  But sometimes I don't, which makes designing views very difficult!

Any thoughts on that?

Regards,
Andrew

Offline daniel_san

  • Jr. Member
  • **
  • Posts: 84
  • Karma: 1
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #5 on: November 08, 2016, 11:00:47 PM »
I have the same code as you, and its working well.

Im using VS 2013.

Can you paste the entire xaml and cs? What is exactly the problem?

PD: I had some problems working with xaml. Sometimes i had to finish manually process XDESCPROC.exe (similar name...) to compile.

Regards.


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7188
  • Karma: 56330
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #6 on: November 08, 2016, 11:47:37 PM »
Which VS version? Pro?

Enviado de meu E6633 usando Tapatalk


Offline abudwill

  • Full Member
  • ***
  • Posts: 148
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #7 on: November 09, 2016, 04:19:03 AM »
VS2012 Pro, also tried with VS2015 Community Edition

XAML code is:

Code: [Select]
<UserControl x:Class="Genesyslab.Desktop.Modules.InteractionExtensionSample.MySample.MySampleButtonView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:common="clr-namespace:Genesyslab.Desktop.WPFCommon;assembly=Genesyslab.Desktop.WPFCommon"
xmlns:commonControls="clr-namespace:Genesyslab.Desktop.WPFCommon.Controls;assembly=Genesyslab.Desktop.WPFCommon"
Height="300" Width="300">

<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<common:DesignTimeResourceDictionary Source="/Genesyslab.Desktop.WPFCommon;component/themes/generic.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

<commonControls:SideButton Name="splitToggleButton" Margin="2,2,0,0" Style="{DynamicResource SideButtonStyle}"
   Content="My _Sample" Click="splitToggleButton_Click" />
</UserControl>

Error is "Object reference not set to an instance of an object" while highlighting DynamicResource SideButtonStyle

I consider the issue closed/done now.  The project still builds, the XAML renderer in VS simply can't display the XAML properly.  Support suggested I reference 8.1 DLL (WPFCommon) during development which will allow me to properly see the view in VS, then switch out to the proper 8.5 DLL when delivering - works for me.




Offline germanjuarez

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #8 on: December 28, 2019, 01:36:45 AM »
Thank you abudwill for share this! I was working blind with some forms and now I can edit and see the results!.. thank you.