UniWPF Addin v1.3

AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
edited 2012-08-28 in Download section
UniWPF Addin
This addin allow dispay any WPF controls on the page. What should be displayed is definet from within NAV through XML and XAML passed to the addin. Right now it is only passive addin, without feedback to the NAV (no events). Could be used to display graphical elements on the page dynamically as needed...

http://www.mibuso.com/dlinfo.asp?FileID=1195

Discuss this download here.

Comments

  • kinekine Member Posts: 12,562
    Example for playing video on page:

    Use this XML for the plugin:
    <Root>
      <Element>
        <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              Height="378" Width="502">
          <MediaElement Height="378" Name="mediaElement1" Width="502" LoadedBehavior="Play" Source="c:\Users\Public\Videos\Sample Videos\Wildlife.wmv" />
        </Grid>
      </Element>
      <Host Width="502" Height="378" BackColor="LightGray"/>
      <Addin AllowCaption="False"/>
    </Root>
    

    Just enter the Source file for the media player and you are done... (and align the width and height if you want)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    UniWPF Addin v1.1
    This addin allow dispay any WPF controls on the page. What should be displayed is definet from within NAV through XML and XAML passed to the addin. Right now it is only passive addin, without feedback to the NAV (no events). Could be used to display graphical elements on the page dynamically as needed...

    What's new in v1.1:

    You can connect events of the controls inside addin to the NAV event - thus handling the events from controls in NAV.
    You can set properties of the controls inside addin dynamically.

    Attached example is easy calculator done in WPF (not fully functional!!! Just for demoing the possibilities). Clicking on numbers fire event in NAV, which will refresh the top line in the addin with new value. Button CE is clearing the value.

    This example demonstrate everything you need:

    Initializing the controls
    Setting properties of the addin
    Setting properties of the controls inside
    Setting events to fire NAV event

    The Index parameter of NAV event is set to value of Tag property of the source control.

    You can use this addin to create touch screens and other things dynamically inside NAV without programming external components.

    Screen shots of your usage of this addin are appreciated!

    http://www.mibuso.com/dlinfo.asp?FileID=1195

    Discuss this download here.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    UniWPF Addin v1.2
    This addin allow dispay any WPF controls on the page. What should be displayed is defined from within NAV through XML and XAML passed to the addin. Could be used to display graphical elements on the page dynamically as needed...

    What's new in v1.2:

    GetProperty - you can now request value of property of selected object, which will be returned asynchronously through Addin trigger back into NAV. Now you can read e.g. TextBox content etc. Look how it is done in the Example for more details...

    What's new in v1.1:

    You can connect events of the controls inside addin to the NAV event - thus handling the events from controls in NAV.
    You can set properties of the controls inside addin dynamically.

    Attached example is easy calculator done in WPF (not fully functional!!! Just for demoing the possibilities). Clicking on numbers fire event in NAV, which will refresh the top line in the addin with new value. Button CE is clearing the value.

    This example demonstrate everything you need:

    Initializing the controls
    Setting properties of the addin
    Setting properties of the controls inside
    Setting events to fire NAV event

    The Index parameter of NAV event is set to value of Tag property of the source control.

    You can use this addin to create touch screens and other things dynamically inside NAV without programming external components.

    Screen shots of your usage of this addin are appreciated!

    http://www.mibuso.com/dlinfo.asp?FileID=1195

    Discuss this download here.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Can you guide us (or me) how we can create the XML-structure? Is this done by hand, or is there a visual tool available which generates this stuff?
    And what MSDN page contains a list of available properties?

    I'm in need of a Color picker, which works in the RTC. Can your UniWPF Addin be used for this? Has it been done before?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • kinekine Member Posts: 12,562
    Can you guide us (or me) how we can create the XML-structure? Is this done by hand, or is there a visual tool available which generates this stuff?
    And what MSDN page contains a list of available properties?

    I'm in need of a Color picker, which works in the RTC. Can your UniWPF Addin be used for this? Has it been done before?

    I think that it could be done, I just need to look at it how it is done...

    The XAML structure could be done e.g. in Visual Studio when you create project and add the XAML file there (user control in WPF project). Than you can visually work with it. Of course, much more could be done manually in the visual studio. From visual studio you can open the MSDN through F1 for each control...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kinekine Member Posts: 12,562
    Regarding the color picker - it could be done, but you need some way how to get the color from some coordinates in some bitmap. The addin will display the bitmap, will react to mouse click, could return the coordinates, but you need to get the color for the coordinates... it look like there is too much code which must be done "behind" that I am not sure you can do it through this universal addin. Still you are bounded only to the properties of the controls and calling methods of the controls, but reading some complex data types could be problem...

    e.g. Help for Button class is here: http://msdn.microsoft.com/query/dev10.q ... 29&rd=true
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • AdministratorAdministrator Member, Moderator, Administrator Posts: 2,500
    UniWPF Addin v1.3
    This addin allow dispay any WPF controls on the page. What should be displayed is defined from within NAV through XML and XAML passed to the addin. Could be used to display graphical elements on the page dynamically as needed...

    What's new in v1.3:

    Now with new functions to add and remove elements dynamically. Still with only the calc demo. I will try to create better demo in future.

    - You can add new elements dynamically into existing controls (if new attribute Parent="ParentObjectName" is used).

    - You can dynamically remove elements from the addin by DelElement.

    - You can use LambdaConverters in the Xaml (functions which could be used in bindings to manipulate the values). See http://code.msdn.microsoft.com/LambdaConverter for more info. Used in the demo to bind size of the ellipse to size of the button when inserting new elements into existing one.

    What's new in v1.2:

    GetProperty - you can now request value of property of selected object, which will be returned asynchronously through Addin trigger back into NAV. Now you can read e.g. TextBox content etc. Look how it is done in the Example for more details...

    What's new in v1.1:

    You can connect events of the controls inside addin to the NAV event - thus handling the events from controls in NAV.
    You can set properties of the controls inside addin dynamically.

    Attached example is easy calculator done in WPF (not fully functional!!! Just for demoing the possibilities). Clicking on numbers fire event in NAV, which will refresh the top line in the addin with new value. Button CE is clearing the value.

    This example demonstrate everything you need:

    Initializing the controls
    Setting properties of the addin
    Setting properties of the controls inside
    Setting events to fire NAV event

    The Index parameter of NAV event is set to value of Tag property of the source control.

    You can use this addin to create touch screens and other things dynamically inside NAV without programming external components.

    Screen shots of your usage of this addin are appreciated!

    http://www.mibuso.com/dlinfo.asp?FileID=1195

    Discuss this download here.
  • kinekine Member Posts: 12,562
    Stay tuned, version 1.4 is on the way, including possibility to work with resources and thus "injecting" data into bounded controls. It will be no problem to pass some XML with data into the addin and the controls will automatically update their content based on this XML... :whistle:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kinekine Member Posts: 12,562
    Source codes are available now on codeplax here: http://uniwpfaddin.codeplex.com/
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.