If I build a new wpf control and add it to coreldraw everything goes well, but if I use a previously used control and add new properties, coreldraw does not set the values defined in appui.xslt for the properties in my wpf control, I can provide more details if needed
for example, I have an older project like https://github.com/bonus630/QrCodeDocker, when trying to change some control property today using APPUI.xslt I can't, if you look at the file in this project the width was changed, but If I try to change another property now it won't work
<itemData guid="efc02df4-8eb5-44b5-8016-1c495af1504e" type="wpfhost"
hostedType="Addons\QrCodeDocker\QrCodeDocker.dll,br.corp.bonus630.QrCodeDocker.Docker"
enable="true" icon="guid://bffeb385-4c48-4fa9-b285-3d32e81030a9" width="326"/>
I created new wpf controls with .net framework settings like this project and it works
Look:
WPF Control
public partial class ControlUI : UserControl,Iinterface { private corel.Application corelApp; private Styles.StylesController stylesController; static Floating floatingWindow; public static readonly DependencyProperty ObjectInfoProperty = DependencyProperty.Register("ObjectInfo",typeof(string),typeof(ControlUI), new PropertyMetadata(OnObjectInfoChanged)); public string ObjectInfo { get { return (string)GetValue(ObjectInfoProperty); } set { SetValue(ObjectInfoProperty, value); } } public ControlUI(object app) { InitializeComponent(); try { this.corelApp = app as corel.Application; stylesController = new Styles.StylesController(this.Resources, this.corelApp); } catch { global::System.Windows.MessageBox.Show("VGCore Erro"); } btn_Command.Click += (s, e) => { if (floatingWindow == null) ShowFloatingWindowWithContent(""); else floatingWindow.Close(); }; } private static void OnObjectInfoChanged(DependencyObject d,DependencyPropertyChangedEventArgs args) { if (floatingWindow != null) floatingWindow.ChangeContent((string)args.NewValue); } private void UserControl_Loaded(object sender, RoutedEventArgs e) { stylesController.LoadThemeFromPreference(); } private void ShowFloatingWindowWithContent(string content) { floatingWindow = new Floating(); floatingWindow.Left = 100; floatingWindow.Top = 100; floatingWindow.Show(); floatingWindow.ChangeContent(content); } } public interface Iinterface { string ObjectInfo { get; set; } }
APPUI.xslt, using native coreldraw datasource "WStatusBarDS"
<itemData guid="f2a5f450-3c8b-48a8-a63c-515ed3c669da" type="wpfhost" hostedType="Addons\ButtonDependency\ButtonDependency.dll,ButtonDependency.ControlUI" enable="true" ObjectInfo="*Bind(DataSource=WStatusBarDS;Path=ObjectInfo;BindType=TwoWay)" />
I tested 3 old projects and created 4 new ones, none of the old ones worked with new properties and one of the new ones didn't work either