Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: abudwill on October 27, 2016, 05:38:33 PM

Title: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: abudwill 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
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: abudwill on October 27, 2016, 05:39:33 PM
For reference I am using VS2012
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: abudwill 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.
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: PeteHoyle 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.
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: abudwill 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
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: daniel_san 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.

Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: cavagnaro on November 08, 2016, 02:47:37 PM
Which VS version? Pro?

Enviado de meu E6633 usando Tapatalk

Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: abudwill 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]
Title: Re: Can anyone compile WDE 8.5.x sample InteractionExtensionSample?
Post by: germanjuarez 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.