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

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« on: October 27, 2016, 05:38:33 PM »
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]
<commonControls:SideButton Name="splitToggleButton" Margin="2,2,0,0" Style="{DynamicResource SideButtonStyle}" Content="My _Sample" Click="splitToggleButton_Click" />
[/code]

Specifically it pukes when trying to locate SideButtonStyle.

Anyone get this sample to compile yet?

Regards,
Andrew

Offline abudwill

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

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #2 on: October 29, 2016, 12: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: 126
  • Karma: 13
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #3 on: October 31, 2016, 09:07:01 AM »
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: 157
  • Karma: 4
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #4 on: November 01, 2016, 04:11:31 PM »
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, 02:00:47 PM »
I have the same code as you, and it´s working well.

I´m 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: 7639
  • Karma: 56330
Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
« Reply #6 on: November 08, 2016, 02:47:37 PM »
Which VS version? Pro?

Enviado de meu E6633 usando Tapatalk


Offline abudwill

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

XAML code is:

[code]
<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>
[/code]

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.



[img][/img]

Offline germanjuarez

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