本文介绍了使用System.Windows.Controls作为参数而不是for的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在C#中有2个项目:一个WPF应用程序和一个旧的空c#项目。在最后一个我有一个验证表单的方法

Hi ,
I have 2 projects in C#: a WPF app and a old empty c# project. In the last one I have a method that validates Forms

public void SetParentUserConrtol(Form parent, uint id)
    {
        // Set the data
        _parentUserControl = parentUserControl;
        _parentID = id;

        // Check valid
        if (!IsValid())
            DisableParent();
    }



我想在我的WPF中使用这个项目,这基本上意味着:我希望我的旧空c#项目能够接收一个System.Windows .UserControl作为参数(或WPF窗口)而不是Form。





我无法添加System.Windows.Controls作为参考。我怎么解决这个问题?这个c#空项目是我的wpf和加密狗代码之间的桥梁,因为我坚持这个。


I want to use this project with my WPF , which basically means : I want that my old empty c# project be able to receive a System.Windows.UserControl as a parameter( or a WPF window) instead a Form.


I am not able to add System.Windows.Controls asa reference. How can I solve this? This c# empty project is the bridge between my wpf and dongle code, for that I am insisting on this.

推荐答案


这篇关于使用System.Windows.Controls作为参数而不是for的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 08:46
查看更多