Quantcast
Viewing all articles
Browse latest Browse all 18858

WPF Interface Misbehave

Hi All,

I have some weird problem going on with my app.

I created an interface as follows 

public interface IConnectable
    {
        bool CanConnect { get; }
    }

it works beautifully when i call the following function behind the code of a Window not a UserControl as follows 

if (isAddNewLink && e.Source is IConnectable && 
                ((IConnectable)e.Source).CanConnect)

& the "CanConnect" returns true, now when i try to implement the same approach in a UserControl to later on call it to a different Window it doesn't return anything, not true no false.

Moreover, the "CanConnect" returns true when a placed node is selected, on a Window base the node is selected while in UserControl Base the node doesn't see to be selectable. 

any ideas ???



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>